* valprint.c (val_print): Update.
authorTom Tromey <tromey@redhat.com>
Thu, 1 Mar 2012 19:26:13 +0000 (19:26 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 1 Mar 2012 19:26:13 +0000 (19:26 +0000)
* p-valprint (pascal_val_print): Return void.
* p-lang.h (pascal_val_print): Return void.
* m2-valprint.c (m2_val_print): Return void.
* m2-lang.h (m2_val_print): Return void.
* language.h (struct language_defn) <la_val_print>: Return void.
* language.c (unk_lang_val_print): Return void.
* jv-valprint.c (java_val_print): Return void.
* jv-lang.h (java_val_print): Return void.
* f-valprint.c (f_val_print): Return void.
* f-lang.h (f_val_print): Return void.
* d-valprint.c (d_val_print): Return void.
(dynamic_array_type): Update.
* d-lang.h (d_val_print): Return void.
* c-valprint.c (c_val_print): Return void.
* c-lang.h (c_val_print): Return void.
* ada-valprint.c (ada_vada_val_print, ada_val_print_1): Return
void.
* ada-lang.h (ada_val_print): Return void.

18 files changed:
gdb/ChangeLog
gdb/ada-lang.h
gdb/ada-valprint.c
gdb/c-lang.h
gdb/c-valprint.c
gdb/d-lang.h
gdb/d-valprint.c
gdb/f-lang.h
gdb/f-valprint.c
gdb/jv-lang.h
gdb/jv-valprint.c
gdb/language.c
gdb/language.h
gdb/m2-lang.h
gdb/m2-valprint.c
gdb/p-lang.h
gdb/p-valprint.c
gdb/valprint.c

index e8efc3c6581bdb389c76b3d8d9be9cb276e4bf6a..8f2540967325175f884e3a1ea5a2a56d1d54763f 100644 (file)
@@ -1,3 +1,25 @@
+2012-03-01  Tom Tromey  <tromey@redhat.com>
+
+       * valprint.c (val_print): Update.
+       * p-valprint (pascal_val_print): Return void.
+       * p-lang.h (pascal_val_print): Return void.
+       * m2-valprint.c (m2_val_print): Return void.
+       * m2-lang.h (m2_val_print): Return void.
+       * language.h (struct language_defn) <la_val_print>: Return void.
+       * language.c (unk_lang_val_print): Return void.
+       * jv-valprint.c (java_val_print): Return void.
+       * jv-lang.h (java_val_print): Return void.
+       * f-valprint.c (f_val_print): Return void.
+       * f-lang.h (f_val_print): Return void.
+       * d-valprint.c (d_val_print): Return void.
+       (dynamic_array_type): Update.
+       * d-lang.h (d_val_print): Return void.
+       * c-valprint.c (c_val_print): Return void.
+       * c-lang.h (c_val_print): Return void.
+       * ada-valprint.c (ada_vada_val_print, ada_val_print_1): Return
+       void.
+       * ada-lang.h (ada_val_print): Return void.
+
 2012-03-01  Tom Tromey  <tromey@redhat.com>
 
        * value.h (val_print): Return void.
index 76dca3227be17028378861498cf08675604d2680..d019a1dfbaa765d39bd09872badd2cf59fbf1a9b 100644 (file)
@@ -164,10 +164,10 @@ extern void ada_print_type (struct type *, const char *, struct ui_file *, int,
 extern void ada_print_typedef (struct type *type, struct symbol *new_symbol,
                               struct ui_file *stream);
 
-extern int ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
-                          struct ui_file *, int,
-                         const struct value *,
-                         const struct value_print_options *);
+extern void ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
+                          struct ui_file *, int,
+                          const struct value *,
+                          const struct value_print_options *);
 
 extern void ada_value_print (struct value *, struct ui_file *,
                             const struct value_print_options *);
index 32b85f2394623b123fc5f575d4e0319863dd0284..2e44898ca01754c0c36d148bd17d3c2f57eecf2d 100644 (file)
@@ -50,10 +50,10 @@ static int print_field_values (struct type *, const gdb_byte *,
 
 static void adjust_type_signedness (struct type *);
 
-static int ada_val_print_1 (struct type *, const gdb_byte *, int, CORE_ADDR,
-                           struct ui_file *, int,
-                           const struct value *,
-                           const struct value_print_options *);
+static void ada_val_print_1 (struct type *, const gdb_byte *, int, CORE_ADDR,
+                            struct ui_file *, int,
+                            const struct value *,
+                            const struct value_print_options *);
 \f
 
 /* Make TYPE unsigned if its range of values includes no negatives.  */
@@ -566,10 +566,9 @@ ada_printstr (struct ui_file *stream, struct type *type,
 
 
 /* See val_print for a description of the various parameters of this
-   function; they are identical.  The semantics of the return value is
-   also identical to val_print.  */
+   function; they are identical.  */
 
-int
+void
 ada_val_print (struct type *type, const gdb_byte *valaddr,
               int embedded_offset, CORE_ADDR address,
               struct ui_file *stream, int recurse,
@@ -577,35 +576,26 @@ ada_val_print (struct type *type, const gdb_byte *valaddr,
               const struct value_print_options *options)
 {
   volatile struct gdb_exception except;
-  int result = 0;
 
   /* XXX: this catches QUIT/ctrl-c as well.  Isn't that busted?  */
   TRY_CATCH (except, RETURN_MASK_ALL)
     {
-      result = ada_val_print_1 (type, valaddr, embedded_offset, address,
-                               stream, recurse, val, options);
+      ada_val_print_1 (type, valaddr, embedded_offset, address,
+                      stream, recurse, val, options);
     }
-
-  if (except.reason < 0)
-    result = 0;
-
-  return result;
 }
 
 /* Assuming TYPE is a simple array, print the value of this array located
    at VALADDR + OFFSET.  See ada_val_print for a description of the various
-   parameters of this function; they are identical.  The semantics
-   of the return value is also identical to ada_val_print.  */
+   parameters of this function; they are identical.  */
 
-static int
+static void
 ada_val_print_array (struct type *type, const gdb_byte *valaddr,
                     int offset, CORE_ADDR address,
                     struct ui_file *stream, int recurse,
                     const struct value *val,
                     const struct value_print_options *options)
 {
-  int result = 0;
-
   /* For an array of chars, print with string syntax.  */
   if (ada_is_string_type (type)
       && (options->format == 0 || options->format == 's'))
@@ -644,7 +634,6 @@ ada_val_print_array (struct type *type, const gdb_byte *valaddr,
         }
 
       printstr (stream, elttype, valaddr + offset, len, 0, eltlen, options);
-      result = len;
     }
   else
     {
@@ -658,14 +647,12 @@ ada_val_print_array (struct type *type, const gdb_byte *valaddr,
                                  stream, recurse, val, options, 0);
       fprintf_filtered (stream, ")");
     }
-
-  return result;
 }
 
 /* See the comment on ada_val_print.  This function differs in that it
    does not catch evaluation errors (leaving that to ada_val_print).  */
 
-static int
+static void
 ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
                 int offset, CORE_ADDR address,
                 struct ui_file *stream, int recurse,
@@ -684,7 +671,6 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
       || (ada_is_constrained_packed_array_type (type)
          && TYPE_CODE (type) != TYPE_CODE_PTR))
     {
-      int retn;
       struct value *mark = value_mark ();
       struct value *val;
 
@@ -701,16 +687,15 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
        {
          gdb_assert (TYPE_CODE (type) == TYPE_CODE_TYPEDEF);
          fprintf_filtered (stream, "0x0");
-         retn = 0;
        }
       else
-       retn = ada_val_print_1 (value_type (val),
-                               value_contents_for_printing (val),
-                               value_embedded_offset (val),
-                               value_address (val), stream, recurse,
-                               val, options);
+       ada_val_print_1 (value_type (val),
+                        value_contents_for_printing (val),
+                        value_embedded_offset (val),
+                        value_address (val), stream, recurse,
+                        val, options);
       value_free_to_mark (mark);
-      return retn;
+      return;
     }
 
   offset_aligned = offset + ada_aligned_value_addr (type, valaddr) - valaddr;
@@ -719,13 +704,14 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
   switch (TYPE_CODE (type))
     {
     default:
-      return c_val_print (type, valaddr, offset, address, stream,
-                         recurse, original_value, options);
+      c_val_print (type, valaddr, offset, address, stream,
+                  recurse, original_value, options);
+      break;
 
     case TYPE_CODE_PTR:
       {
-       int ret = c_val_print (type, valaddr, offset, address,
-                              stream, recurse, original_value, options);
+       c_val_print (type, valaddr, offset, address,
+                    stream, recurse, original_value, options);
 
        if (ada_is_tag_type (type))
          {
@@ -737,9 +723,8 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
 
            if (name != NULL) 
              fprintf_filtered (stream, " (%s)", name);
-           return 0;
-       }
-       return ret;
+         }
+       return;
       }
 
     case TYPE_CODE_INT:
@@ -751,7 +736,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
 
          fprintf_filtered (stream, len < 4 ? "%.11g" : "%.17g",
                            (double) ada_fixed_to_float (type, v));
-         return 0;
+         return;
        }
       else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
        {
@@ -767,16 +752,17 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
                = value_from_contents_and_address (type, valaddr + offset, 0);
              struct value *v = value_cast (target_type, v1);
 
-             return ada_val_print_1 (target_type,
-                                     value_contents_for_printing (v),
-                                     value_embedded_offset (v), 0,
-                                     stream, recurse + 1, v, options);
+             ada_val_print_1 (target_type,
+                              value_contents_for_printing (v),
+                              value_embedded_offset (v), 0,
+                              stream, recurse + 1, v, options);
            }
          else
-           return ada_val_print_1 (TYPE_TARGET_TYPE (type),
-                                   valaddr, offset,
-                                   address, stream, recurse,
-                                   original_value, options);
+           ada_val_print_1 (TYPE_TARGET_TYPE (type),
+                            valaddr, offset,
+                            address, stream, recurse,
+                            original_value, options);
+         return;
        }
       else
        {
@@ -821,7 +807,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
                  ada_printchar (c, type, stream);
                }
            }
-         return 0;
+         return;
        }
 
     case TYPE_CODE_ENUM:
@@ -866,8 +852,11 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
 
     case TYPE_CODE_FLT:
       if (options->format)
-       return c_val_print (type, valaddr, offset, address, stream,
-                           recurse, original_value, options);
+       {
+         c_val_print (type, valaddr, offset, address, stream,
+                      recurse, original_value, options);
+         return;
+       }
       else
        ada_print_floating (valaddr + offset, type, stream);
       break;
@@ -877,19 +866,20 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
       if (ada_is_bogus_array_descriptor (type))
        {
          fprintf_filtered (stream, "(...?)");
-         return 0;
+         return;
        }
       else
        {
          print_record (type, valaddr, offset_aligned,
                        stream, recurse, original_value, options);
-         return 0;
+         return;
        }
 
     case TYPE_CODE_ARRAY:
-      return ada_val_print_array (type, valaddr, offset_aligned,
-                                 address, stream, recurse, original_value,
-                                 options);
+      ada_val_print_array (type, valaddr, offset_aligned,
+                          address, stream, recurse, original_value,
+                          options);
+      return;
 
     case TYPE_CODE_REF:
       /* For references, the debugger is expected to print the value as
@@ -935,7 +925,6 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr,
       break;
     }
   gdb_flush (stream);
-  return 0;
 }
 
 static int
index 74574e2a3810d71b4669ebd076f1c97891abc125..5cbe34d2e6673d04e32798880c6b2ba14507e861 100644 (file)
@@ -71,11 +71,11 @@ extern void c_print_typedef (struct type *,
                             struct symbol *,
                             struct ui_file *);
 
-extern int c_val_print (struct type *, const gdb_byte *,
-                       int, CORE_ADDR,
-                       struct ui_file *, int,
-                       const struct value *,
-                       const struct value_print_options *);
+extern void c_val_print (struct type *, const gdb_byte *,
+                        int, CORE_ADDR,
+                        struct ui_file *, int,
+                        const struct value *,
+                        const struct value_print_options *);
 
 extern void c_value_print (struct value *, struct ui_file *,
                           const struct value_print_options *);
index 98901ce5a8eb1a5f3b237d1898872542ca60c941..12cbb9cd7e16f2de4b1704287a1a23d6c0e506ea 100644 (file)
@@ -117,10 +117,9 @@ c_textual_element_type (struct type *type, char format)
 }
 
 /* See val_print for a description of the various parameters of this
-   function; they are identical.  The semantics of the return value is
-   also identical to val_print.  */
+   function; they are identical.  */
 
-int
+void
 c_val_print (struct type *type, const gdb_byte *valaddr,
             int embedded_offset, CORE_ADDR address,
             struct ui_file *stream, int recurse,
@@ -262,9 +261,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
              /* Try to print what function it points to.  */
              print_function_pointer_address (gdbarch, addr, stream,
                                              options->addressprint);
-             /* Return value is irrelevant except for string
-                pointers.  */
-             return (0);
+             return;
            }
 
          if (options->addressprint)
@@ -328,12 +325,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
                    }
                }
            }
-
-         /* Return number of characters printed, including the
-            terminating '\0' if we reached the end.  val_print_string
-            takes care including the terminating '\0' if
-            necessary.  */
-         return i;
+         return;
        }
       break;
 
@@ -641,7 +633,6 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
             TYPE_CODE (type));
     }
   gdb_flush (stream);
-  return (0);
 }
 \f
 void
index 67ca14cb47abbeb3927ff548a15e6e2eb4afd05f..f93405a3ea28e99506eea7f4738d7aebca0217b4 100644 (file)
 
 extern char *d_demangle (const char *mangled, int options);
 
-extern int d_val_print (struct type *type, const gdb_byte *valaddr,
-                       int embedded_offset, CORE_ADDR address,
-                       struct ui_file *stream, int recurse,
-                       const struct value *val,
-                       const struct value_print_options *options);
+extern void d_val_print (struct type *type, const gdb_byte *valaddr,
+                        int embedded_offset, CORE_ADDR address,
+                        struct ui_file *stream, int recurse,
+                        const struct value *val,
+                        const struct value_print_options *options);
 
 #endif /* !defined (D_LANG_H) */
index 527c08784ed437b191bec3057953810c8be89e22..3a8d11d5487c8f010df1ccd02f6a4e3a87a4e894 100644 (file)
 #include "d-lang.h"
 #include "c-lang.h"
 
-/* Assuming that TYPE is a TYPE_CODE_STRUCT, verify that TYPE is
-   a dynamic array, and then print its value to STREAM.  Return
-   the number of string characters printed, or -1 if TYPE is not
-   a dynamic array.  */
+/* Assuming that TYPE is a TYPE_CODE_STRUCT, verify that TYPE is a
+   dynamic array, and then print its value to STREAM.  Return zero if
+   TYPE is a dynamic array, non-zero otherwise.  */
+
 static int
 dynamic_array_type (struct type *type, const gdb_byte *valaddr,
                    int embedded_offset, CORE_ADDR address,
@@ -60,16 +60,17 @@ dynamic_array_type (struct type *type, const gdb_byte *valaddr,
       true_type = lookup_array_range_type (true_type, 0, length - 1);
       ival = value_at (true_type, addr);
 
-      return d_val_print (true_type,
-                         value_contents_for_printing (ival),
-                         value_embedded_offset (ival), addr,
-                         stream, recurse + 1, ival, options);
+      d_val_print (true_type,
+                  value_contents_for_printing (ival),
+                  value_embedded_offset (ival), addr,
+                  stream, recurse + 1, ival, options);
+      return 0;
     }
-  return -1;
+  return 1;
 }
 
 /* Implements the la_val_print routine for language D.  */
-int
+void
 d_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
              CORE_ADDR address, struct ui_file *stream, int recurse,
             const struct value *val,
@@ -83,12 +84,10 @@ d_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
       case TYPE_CODE_STRUCT:
         ret = dynamic_array_type (type, valaddr, embedded_offset, address,
                                  stream, recurse, val, options);
-       if (ret != -1)
-          break;
+       if (ret == 0)
+         break;
       default:
-       ret = c_val_print (type, valaddr, embedded_offset, address, stream,
-                          recurse, val, options);
+       c_val_print (type, valaddr, embedded_offset, address, stream,
+                    recurse, val, options);
     }
-
-  return ret;
 }
index 4e5563d3b808989af712809f86e4dc45d27b6111..4aae3c5d8234adc520d2ec0688854a098bbb7ed9 100644 (file)
@@ -28,10 +28,10 @@ extern void f_error (char *);       /* Defined in f-exp.y */
 extern void f_print_type (struct type *, const char *, struct ui_file *, int,
                          int);
 
-extern int f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
-                       struct ui_file *, int,
-                       const struct value *,
-                       const struct value_print_options *);
+extern void f_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
+                        struct ui_file *, int,
+                        const struct value *,
+                        const struct value_print_options *);
 
 /* Language-specific data structures */
 
index 17f747f5cd0d84c0cd29ab58b5dc75ed9a7c077f..2738cebe5f6594c3a70dc9f7ee796ccbc51b6a00 100644 (file)
@@ -243,10 +243,9 @@ Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"),
 \f
 
 /* See val_print for a description of the various parameters of this
-   function; they are identical.  The semantics of the return value is
-   also identical to val_print.  */
+   function; they are identical.  */
 
-int
+void
 f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
             CORE_ADDR address, struct ui_file *stream, int recurse,
             const struct value *original_value,
@@ -306,8 +305,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
            {
              /* Try to print what function it points to.  */
              print_address_demangle (gdbarch, addr, stream, demangle);
-             /* Return value is irrelevant except for string pointers.  */
-             return 0;
+             return;
            }
 
          if (options->addressprint && options->format != 's')
@@ -321,11 +319,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
              && addr != 0)
            i = val_print_string (TYPE_TARGET_TYPE (type), NULL, addr, -1,
                                  stream, options);
-
-         /* Return number of characters printed, including the terminating
-            '\0' if we reached the end.  val_print_string takes care including
-            the terminating '\0' if necessary.  */
-         return i;
+         return;
        }
       break;
 
@@ -514,7 +508,6 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
       error (_("Invalid F77 type code %d in symbol table."), TYPE_CODE (type));
     }
   gdb_flush (stream);
-  return 0;
 }
 
 static void
index ffe25bf81f0133f3aa6904c519701164cde15b9d..8ea9c3c24f8cd8f6a35e4e6af87dba3a3b83ba4e 100644 (file)
@@ -42,10 +42,10 @@ struct builtin_java_type
 
 extern const struct builtin_java_type *builtin_java_type (struct gdbarch *);
 
-extern int java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
-                          struct ui_file *, int,
-                          const struct value *,
-                          const struct value_print_options *);
+extern void java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
+                           struct ui_file *, int,
+                           const struct value *,
+                           const struct value_print_options *);
 
 extern void java_value_print (struct value *, struct ui_file *,
                              const struct value_print_options *);
index 125e611388f95392866288c78ce9ff4adcc9e7ed..648dbc7a3b52a4ce5fa17287c47c90f082a671a3 100644 (file)
@@ -475,10 +475,9 @@ java_print_value_fields (struct type *type, const gdb_byte *valaddr,
 }
 
 /* See val_print for a description of the various parameters of this
-   function; they are identical.  The semantics of the return value is
-   also identical to val_print.  */
+   function; they are identical.  */
 
-int
+void
 java_val_print (struct type *type, const gdb_byte *valaddr,
                int embedded_offset, CORE_ADDR address,
                struct ui_file *stream, int recurse,
@@ -504,7 +503,7 @@ java_val_print (struct type *type, const gdb_byte *valaddr,
       if (addr == 0)
        {
          fputs_filtered ("null", stream);
-         return i;
+         return;
        }
       target_type = check_typedef (TYPE_TARGET_TYPE (type));
 
@@ -512,8 +511,7 @@ java_val_print (struct type *type, const gdb_byte *valaddr,
        {
          /* Try to print what function it points to.  */
          print_address_demangle (gdbarch, addr, stream, demangle);
-         /* Return value is irrelevant except for string pointers.  */
-         return (0);
+         return;
        }
 
       if (options->addressprint && options->format != 's')
@@ -522,7 +520,7 @@ java_val_print (struct type *type, const gdb_byte *valaddr,
          print_longest (stream, 'x', 0, (ULONGEST) addr);
        }
 
-      return i;
+      return;
 
     case TYPE_CODE_CHAR:
     case TYPE_CODE_INT:
@@ -553,9 +551,8 @@ java_val_print (struct type *type, const gdb_byte *valaddr,
       break;
 
     default:
-      return c_val_print (type, valaddr, embedded_offset, address, stream,
-                         recurse, val, options);
+      c_val_print (type, valaddr, embedded_offset, address, stream,
+                  recurse, val, options);
+      break;
     }
-
-  return 0;
 }
index f312a1643b497f2d3dc86d8d4949d39209e38fc9..ae3410861136332eec47fc8d119f8420ae6429a1 100644 (file)
@@ -847,7 +847,7 @@ unk_lang_print_type (struct type *type, const char *varstring,
           "function unk_lang_print_type called."));
 }
 
-static int
+static void
 unk_lang_val_print (struct type *type, const gdb_byte *valaddr,
                    int embedded_offset, CORE_ADDR address,
                    struct ui_file *stream, int recurse,
index 3156f27b8c99e883db7922812d952ee7aa42c213..76dad325b5b740a9c73fd007a5bb669db13d589d 100644 (file)
@@ -240,12 +240,12 @@ struct language_defn
        OPTIONS are the formatting options to be used when
        printing.  */
 
-    int (*la_val_print) (struct type *type,
-                        const gdb_byte *contents,
-                        int embedded_offset, CORE_ADDR address,
-                        struct ui_file *stream, int recurse,
-                        const struct value *val,
-                        const struct value_print_options *options);
+    void (*la_val_print) (struct type *type,
+                         const gdb_byte *contents,
+                         int embedded_offset, CORE_ADDR address,
+                         struct ui_file *stream, int recurse,
+                         const struct value *val,
+                         const struct value_print_options *options);
 
     /* Print a top-level value using syntax appropriate for this language.  */
 
index 2803e634ff7270f4cae124e2a1adb7a9f511122e..fc6de3450f8f270218850b8106b853d4d1c7be16 100644 (file)
@@ -32,10 +32,10 @@ extern void m2_print_typedef (struct type *, struct symbol *,
 extern int m2_is_long_set (struct type *type);
 extern int m2_is_unbounded_array (struct type *type);
 
-extern int m2_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
-                        struct ui_file *, int,
-                        const struct value *,
-                        const struct value_print_options *);
+extern void m2_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
+                         struct ui_file *, int,
+                         const struct value *,
+                         const struct value_print_options *);
 
 extern int get_long_set_bounds (struct type *type, LONGEST *low,
                                LONGEST *high);
index abe1960502b39e89942f8499cf8aefd6b2bf3283..dade010be91a8cbc3dd6e1cd145b366778e4dc1c 100644 (file)
@@ -290,10 +290,9 @@ m2_print_array_contents (struct type *type, const gdb_byte *valaddr,
 
 
 /* See val_print for a description of the various parameters of this
-   function; they are identical.  The semantics of the return value is
-   also identical to val_print.  */
+   function; they are identical.  */
 
-int
+void
 m2_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
              CORE_ADDR address, struct ui_file *stream, int recurse,
              const struct value *original_value,
@@ -644,5 +643,4 @@ m2_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
       error (_("Invalid m2 type code %d in symbol table."), TYPE_CODE (type));
     }
   gdb_flush (stream);
-  return (0);
 }
index 5b0691b84f1edfa41cde460909c590536ae74476..b1e218c261c11ca261caa893fbcb49086aa97f8e 100644 (file)
@@ -35,10 +35,10 @@ extern void pascal_print_type (struct type *, const char *, struct ui_file *,
 extern void pascal_print_typedef (struct type *, struct symbol *,
                                  struct ui_file *);
 
-extern int pascal_val_print (struct type *, const gdb_byte *, int,
-                            CORE_ADDR, struct ui_file *, int,
-                            const struct value *,
-                            const struct value_print_options *);
+extern void pascal_val_print (struct type *, const gdb_byte *, int,
+                             CORE_ADDR, struct ui_file *, int,
+                             const struct value *,
+                             const struct value_print_options *);
 
 extern void pascal_value_print (struct value *, struct ui_file *,
                                const struct value_print_options *);
index 6b227548d8bcd00283340ee7fbf8e9fbe0d089c6..a46f3440fbcf376c64c61ccf0af6ed1f0c1bb47b 100644 (file)
 \f
 
 /* See val_print for a description of the various parameters of this
-   function; they are identical.  The semantics of the return value is
-   also identical to val_print.  */
+   function; they are identical.  */
 
-int
+void
 pascal_val_print (struct type *type, const gdb_byte *valaddr,
                  int embedded_offset, CORE_ADDR address,
                  struct ui_file *stream, int recurse,
@@ -159,8 +158,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
        {
          /* Try to print what function it points to.  */
          print_address_demangle (gdbarch, addr, stream, demangle);
-         /* Return value is irrelevant except for string pointers.  */
-         return (0);
+         return;
        }
 
       if (options->addressprint && options->format != 's')
@@ -248,12 +246,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
            }
        }
 
-      /* Return number of characters printed, including the terminating
-        '\0' if we reached the end.  val_print_string takes care including
-        the terminating '\0' if necessary.  */
-      return i;
-
-      break;
+      return;
 
     case TYPE_CODE_REF:
       elttype = check_typedef (TYPE_TARGET_TYPE (type));
@@ -576,7 +569,6 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
             TYPE_CODE (type));
     }
   gdb_flush (stream);
-  return (0);
 }
 \f
 void
index 0bdde01040826ca68b575de5d5f6ec0924021695..6c20bd9f4d34e888125b335e0c0395b04339ce59 100644 (file)
@@ -383,9 +383,9 @@ val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
 
   TRY_CATCH (except, RETURN_MASK_ERROR)
     {
-      ret = language->la_val_print (type, valaddr, embedded_offset, address,
-                                   stream, recurse, val,
-                                   &local_opts);
+      language->la_val_print (type, valaddr, embedded_offset, address,
+                             stream, recurse, val,
+                             &local_opts);
     }
   if (except.reason < 0)
     fprintf_filtered (stream, _("<error reading variable>"));
This page took 0.053758 seconds and 4 git commands to generate.