* c-valprint.c (c_val_print): Add embedded_offset to address
authorPierre Muller <muller@sourceware.org>
Fri, 18 Feb 2011 14:17:38 +0000 (14:17 +0000)
committerPierre Muller <muller@sourceware.org>
Fri, 18 Feb 2011 14:17:38 +0000 (14:17 +0000)
for arrays of unspecified length.
* p-valprint.c (pascal_val_print): Likewise.

gdb/ChangeLog
gdb/c-valprint.c
gdb/p-valprint.c

index c349212a3c23763808bd0184e2ea6d85c8d458f1..c55cc8f34608ddf553e678961cde355a5b68e720 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * c-valprint.c (c_val_print): Add embedded_offset to address
+       for arrays of unspecified length.
+       * p-valprint.c (pascal_val_print): Likewise.
+
 2011-02-18  Yao Qi  <yao@codesourcery.com>
 
        * gdb/arm-tdep.c (arm_displaced_step_copy_insn): Move code to ...
index 8e4f9326741a7061644a3e1fb6bd41330f1a5d0f..76579d2116c1a016fdb14f516ed2d57503c53629 100644 (file)
@@ -240,7 +240,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
        }
       /* Array of unspecified length: treat like pointer to first
         elt.  */
-      addr = address;
+      addr = address + embedded_offset;
       goto print_unpacked_pointer;
 
     case TYPE_CODE_MEMBERPTR:
index fc50e2a3140e35ab3cc9fb105010dde237680e5c..ee765421eeb625a4b2c4377ffda7e9ef7da720d9 100644 (file)
@@ -128,7 +128,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
          break;
        }
       /* Array of unspecified length: treat like pointer to first elt.  */
-      addr = address;
+      addr = address + embedded_offset;
       goto print_unpacked_pointer;
 
     case TYPE_CODE_PTR: