2008-11-24 Paul Pluzhnikov <ppluzhnikov@google.com>
authorTom Tromey <tromey@redhat.com>
Mon, 24 Nov 2008 18:10:11 +0000 (18:10 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 24 Nov 2008 18:10:11 +0000 (18:10 +0000)
* valprint.c (val_print_array_elements): Pass correct
element address to val_print.

gdb/ChangeLog
gdb/valprint.c

index faf0053146b887028155df404779f9f584c91857..984cf47421898b211d9813ff7025f4df860618fd 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-24  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+       * valprint.c (val_print_array_elements): Pass correct
+       element address to val_print.
+       
 2008-11-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Fix access of an already freed memory.
index 5086a7009721f99d1db8c9dbe08302aa24fd29b3..6bcb2f83fb6af4b0c0927403a82d63213ef84839 100644 (file)
@@ -1112,8 +1112,8 @@ val_print_array_elements (struct type *type, const gdb_byte *valaddr,
 
       if (reps > options->repeat_count_threshold)
        {
-         val_print (elttype, valaddr + i * eltlen, 0, 0, stream,
-                    recurse + 1, options, current_language);
+         val_print (elttype, valaddr + i * eltlen, 0, address + i * eltlen,
+                    stream, recurse + 1, options, current_language);
          annotate_elt_rep (reps);
          fprintf_filtered (stream, " <repeats %u times>", reps);
          annotate_elt_rep_end ();
@@ -1123,8 +1123,8 @@ val_print_array_elements (struct type *type, const gdb_byte *valaddr,
        }
       else
        {
-         val_print (elttype, valaddr + i * eltlen, 0, 0, stream,
-                    recurse + 1, options, current_language);
+         val_print (elttype, valaddr + i * eltlen, 0, address + i * eltlen,
+                    stream, recurse + 1, options, current_language);
          annotate_elt ();
          things_printed++;
        }