diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/c-valprint.c | 2 | ||||
-rw-r--r-- | gdb/p-valprint.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c349212..c55cc8f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 ... diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 8e4f932..76579d2 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 fc50e2a..ee76542 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: |