* 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.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.
2012-03-01 Tom Tromey <tromey@redhat.com>
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 */
comma_needed, outer_type, outer_offset);
}
-int
+void
ada_value_print (struct value *val0, struct ui_file *stream,
const struct value_print_options *options)
{
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
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: */
return (0);
}
\f
-int
+void
c_value_print (struct value *val, struct ui_file *stream,
const struct value_print_options *options)
{
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. */
}
/* 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);
}
#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. */
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",
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 *);
/* Local functions */
-int
+void
java_value_print (struct value *val, struct ui_file *stream,
const struct value_print_options *options)
{
fprintf_filtered (stream, "}");
- return 0;
+ return;
}
/* If it's type String, print it. */
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
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);
"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)
{
/* 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,
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 *);
return (0);
}
\f
-int
+void
pascal_value_print (struct value *val, struct ui_file *stream,
const struct value_print_options *options)
{
fprintf_filtered (stream, ") ");
}
}
- return common_val_print (val, stream, 0, &opts, current_language);
+ common_val_print (val, stream, 0, &opts, current_language);
}
}
/* 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)
{
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
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,