* 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.
This commit is contained in:
parent
be3359361a
commit
8e069a981c
|
@ -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.
|
||||
|
|
|
@ -169,7 +169,7 @@ 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 *,
|
||||
extern void ada_value_print (struct value *, struct ui_file *,
|
||||
const struct value_print_options *);
|
||||
|
||||
/* Defined in ada-lang.c */
|
||||
|
|
|
@ -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),
|
||||
val_print (type, value_contents_for_printing (val),
|
||||
value_embedded_offset (val), address,
|
||||
stream, 0, val, &opts, current_language));
|
||||
stream, 0, val, &opts, current_language);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -77,7 +77,7 @@ 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 *,
|
||||
extern void c_value_print (struct value *, struct ui_file *,
|
||||
const struct value_print_options *);
|
||||
|
||||
/* These are in c-lang.c: */
|
||||
|
|
|
@ -644,7 +644,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
return (0);
|
||||
}
|
||||
|
||||
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),
|
||||
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,15 +761,16 @@ 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),
|
||||
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),
|
||||
val_print (val_type, value_contents_for_printing (val),
|
||||
value_embedded_offset (val),
|
||||
value_address (val),
|
||||
stream, 0,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -47,7 +47,7 @@ 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 *,
|
||||
extern void java_value_print (struct value *, struct ui_file *,
|
||||
const struct value_print_options *);
|
||||
|
||||
extern struct value *java_class_from_object (struct value *);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -66,7 +66,7 @@ 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 *,
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -249,7 +249,7 @@ struct language_defn
|
|||
|
||||
/* Print a top-level value using syntax appropriate for this language. */
|
||||
|
||||
int (*la_value_print) (struct value *, struct ui_file *,
|
||||
void (*la_value_print) (struct value *, struct ui_file *,
|
||||
const struct value_print_options *);
|
||||
|
||||
/* PC is possibly an unknown languages trampoline.
|
||||
|
|
|
@ -40,7 +40,7 @@ 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 *,
|
||||
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 *,
|
||||
|
|
|
@ -579,7 +579,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
return (0);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -808,7 +808,7 @@ 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,
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue