aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog18
-rw-r--r--gdb/ada-lang.h4
-rw-r--r--gdb/ada-valprint.c10
-rw-r--r--gdb/c-lang.h4
-rw-r--r--gdb/c-valprint.c30
-rw-r--r--gdb/f-lang.c6
-rw-r--r--gdb/jv-lang.h4
-rw-r--r--gdb/jv-valprint.c8
-rw-r--r--gdb/language.c6
-rw-r--r--gdb/language.h4
-rw-r--r--gdb/p-lang.h4
-rw-r--r--gdb/p-valprint.c4
-rw-r--r--gdb/valprint.c13
-rw-r--r--gdb/value.h4
14 files changed, 66 insertions, 53 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b511e1a..480aa16 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,23 @@
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>
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index fd7b0df..76dca32 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -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 */
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 5cb2f98..32b85f2 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.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),
- 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
diff --git a/gdb/c-lang.h b/gdb/c-lang.h
index e8c632f..74574e2 100644
--- a/gdb/c-lang.h
+++ b/gdb/c-lang.h
@@ -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: */
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 0054dc0..98901ce 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.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),
- 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);
}
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 805b143..ef78bc3 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -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",
diff --git a/gdb/jv-lang.h b/gdb/jv-lang.h
index d061096..ffe25bf 100644
--- a/gdb/jv-lang.h
+++ b/gdb/jv-lang.h
@@ -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 *);
diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c
index 7f6e931..125e611 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -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
diff --git a/gdb/language.c b/gdb/language.c
index 49ba21a..f312a16 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -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)
{
diff --git a/gdb/language.h b/gdb/language.h
index a47a44d..3156f27 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -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,
diff --git a/gdb/p-lang.h b/gdb/p-lang.h
index 180c544..5b0691b 100644
--- a/gdb/p-lang.h
+++ b/gdb/p-lang.h
@@ -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 *);
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 39eff10..6b22754 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -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);
}
diff --git a/gdb/valprint.c b/gdb/valprint.c
index a348cf4..9ff0f27 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -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
diff --git a/gdb/value.h b/gdb/value.h
index d4c4a83..9706e70 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -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,