From: Pierre Muller Date: Fri, 18 Feb 2011 14:17:38 +0000 (+0000) Subject: * c-valprint.c (c_val_print): Add embedded_offset to address X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=13163d8050012d1c79f1ec764c1f621aa47f1c27;p=deliverable%2Fbinutils-gdb.git * c-valprint.c (c_val_print): Add embedded_offset to address for arrays of unspecified length. * p-valprint.c (pascal_val_print): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c349212a3c..c55cc8f346 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2011-02-18 Pierre Muller + + * 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 * gdb/arm-tdep.c (arm_displaced_step_copy_insn): Move code to ... diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 8e4f932674..76579d2116 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -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: diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index fc50e2a314..ee765421ee 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -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: