From: Pedro Alves Date: Mon, 24 Jan 2011 21:28:12 +0000 (+0000) Subject: * ada-valprint.c (val_print_packed_array_elements): Pass the X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a491d753e80c10865e5fc704377ae41d9421bfe5;p=binutils-gdb.git * ada-valprint.c (val_print_packed_array_elements): Pass the correct struct value to val_print. (ada_val_print_1): Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 68798b6db33..efa9c57307c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2011-01-24 Pedro Alves + + * ada-valprint.c (val_print_packed_array_elements): Pass the + correct struct value to val_print. + (ada_val_print_1): Ditto. + 2011-01-24 Pedro Alves Don't lose embedded_offset in printing routines throughout. diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 2b5aa44f2f9..d0810c7d79d 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -211,7 +211,7 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr, opts.deref_ref = 0; val_print (elttype, value_contents_for_printing (v0), value_embedded_offset (v0), 0, stream, - recurse + 1, val, &opts, current_language); + recurse + 1, v0, &opts, current_language); annotate_elt_rep (i - i0); fprintf_filtered (stream, _(" "), i - i0); annotate_elt_rep_end (); @@ -242,7 +242,7 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr, } val_print (elttype, value_contents_for_printing (v0), value_embedded_offset (v0), 0, stream, - recurse + 1, val, &opts, current_language); + recurse + 1, v0, &opts, current_language); annotate_elt (); } } @@ -708,7 +708,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr, value_contents_for_printing (val), value_embedded_offset (val), value_address (val), stream, recurse, - NULL, options); + val, options); value_free_to_mark (mark); return retn; } @@ -770,7 +770,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr, return ada_val_print_1 (target_type, value_contents_for_printing (v), value_embedded_offset (v), 0, - stream, recurse + 1, NULL, options); + stream, recurse + 1, v, options); } else return ada_val_print_1 (TYPE_TARGET_TYPE (type), @@ -915,7 +915,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr, value_contents_for_printing (deref_val), value_embedded_offset (deref_val), value_address (deref_val), stream, recurse + 1, - original_value, options, current_language); + deref_val, options, current_language); } else fputs_filtered ("(null)", stream);