diff options
author | Tom Tromey <tromey@redhat.com> | 2012-03-01 19:26:13 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-03-01 19:26:13 +0000 |
commit | d3eab38a48ec521922e7d07595fd693df7ff3510 (patch) | |
tree | 91ec380f79ea2c3d97f8830928e6b3dcb64ed0b9 /gdb | |
parent | 35c0084bfcd4d275c63061212eae5757e34d74ef (diff) | |
download | binutils-d3eab38a48ec521922e7d07595fd693df7ff3510.zip binutils-d3eab38a48ec521922e7d07595fd693df7ff3510.tar.gz binutils-d3eab38a48ec521922e7d07595fd693df7ff3510.tar.bz2 |
* 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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 22 | ||||
-rw-r--r-- | gdb/ada-lang.h | 8 | ||||
-rw-r--r-- | gdb/ada-valprint.c | 103 | ||||
-rw-r--r-- | gdb/c-lang.h | 10 | ||||
-rw-r--r-- | gdb/c-valprint.c | 17 | ||||
-rw-r--r-- | gdb/d-lang.h | 10 | ||||
-rw-r--r-- | gdb/d-valprint.c | 31 | ||||
-rw-r--r-- | gdb/f-lang.h | 8 | ||||
-rw-r--r-- | gdb/f-valprint.c | 15 | ||||
-rw-r--r-- | gdb/jv-lang.h | 8 | ||||
-rw-r--r-- | gdb/jv-valprint.c | 19 | ||||
-rw-r--r-- | gdb/language.c | 2 | ||||
-rw-r--r-- | gdb/language.h | 12 | ||||
-rw-r--r-- | gdb/m2-lang.h | 8 | ||||
-rw-r--r-- | gdb/m2-valprint.c | 6 | ||||
-rw-r--r-- | gdb/p-lang.h | 8 | ||||
-rw-r--r-- | gdb/p-valprint.c | 16 | ||||
-rw-r--r-- | gdb/valprint.c | 6 |
18 files changed, 145 insertions, 164 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e8efc3c..8f25409 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,27 @@ 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. * valprint.c (val_print): Return void. diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 76dca32..d019a1d 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -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 *); diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 32b85f2..2e44898 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -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 *); /* 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 diff --git a/gdb/c-lang.h b/gdb/c-lang.h index 74574e2..5cbe34d 100644 --- a/gdb/c-lang.h +++ b/gdb/c-lang.h @@ -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 *); diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 98901ce..12cbb9c 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -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); } void diff --git a/gdb/d-lang.h b/gdb/d-lang.h index 67ca14c..f93405a 100644 --- a/gdb/d-lang.h +++ b/gdb/d-lang.h @@ -24,10 +24,10 @@ 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) */ diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c index 527c087..3a8d11d 100644 --- a/gdb/d-valprint.c +++ b/gdb/d-valprint.c @@ -23,10 +23,10 @@ #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; } diff --git a/gdb/f-lang.h b/gdb/f-lang.h index 4e5563d..4aae3c5 100644 --- a/gdb/f-lang.h +++ b/gdb/f-lang.h @@ -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 */ diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 17f747f..2738ceb 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -243,10 +243,9 @@ Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"), /* 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 diff --git a/gdb/jv-lang.h b/gdb/jv-lang.h index ffe25bf..8ea9c3c 100644 --- a/gdb/jv-lang.h +++ b/gdb/jv-lang.h @@ -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 *); diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index 125e611..648dbc7 100644 --- a/gdb/jv-valprint.c +++ b/gdb/jv-valprint.c @@ -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; } diff --git a/gdb/language.c b/gdb/language.c index f312a16..ae34108 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -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, diff --git a/gdb/language.h b/gdb/language.h index 3156f27..76dad32 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -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. */ diff --git a/gdb/m2-lang.h b/gdb/m2-lang.h index 2803e63..fc6de34 100644 --- a/gdb/m2-lang.h +++ b/gdb/m2-lang.h @@ -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); diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c index abe1960..dade010 100644 --- a/gdb/m2-valprint.c +++ b/gdb/m2-valprint.c @@ -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); } diff --git a/gdb/p-lang.h b/gdb/p-lang.h index 5b0691b..b1e218c 100644 --- a/gdb/p-lang.h +++ b/gdb/p-lang.h @@ -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 *); diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 6b22754..a46f344 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -42,10 +42,9 @@ /* 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); } void diff --git a/gdb/valprint.c b/gdb/valprint.c index 0bdde01..6c20bd9 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -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>")); |