From: Ulrich Weigand Date: Thu, 11 Sep 2008 14:17:24 +0000 (+0000) Subject: * ada-valprint.c (ada_val_print_1): When implicitly dereferencing X-Git-Tag: reverse-20080930-branchpoint~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8631d213f802a03c92513bb264b2f4ae65eb259;p=thirdparty%2Fbinutils-gdb.git * ada-valprint.c (ada_val_print_1): When implicitly dereferencing a reference type, pass the reference type directly to unpack_pointer. * c-valprint.c (c_val_print): Likewise. * f-valprint.c (f_val_print): Likewise. * m2-valprint.c (print_variable_at_address, m2_val_print): Likewise. * p-valprint.c (pascal_val_print): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ec43cbd3c76..4249f7f0fce 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2008-09-11 Ulrich Weigand + + * ada-valprint.c (ada_val_print_1): When implicitly dereferencing + a reference type, pass the reference type directly to unpack_pointer. + * c-valprint.c (c_val_print): Likewise. + * f-valprint.c (f_val_print): Likewise. + * m2-valprint.c (print_variable_at_address, m2_val_print): Likewise. + * p-valprint.c (pascal_val_print): Likewise. + 2008-09-11 Ulrich Weigand * eval.c (evaluate_subexp_standard): Use builtin_type_int8 diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 7ae8c0f633b..dbce8d3d212 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -891,9 +891,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr0, if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF) { - LONGEST deref_val_int = (LONGEST) - unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr); + LONGEST deref_val_int = (LONGEST) unpack_pointer (type, valaddr); if (deref_val_int != 0) { struct value *deref_val = diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 30a1be74076..9d8b439065d 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -310,8 +310,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, struct value *deref_val = value_at (TYPE_TARGET_TYPE (type), - unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr + embedded_offset)); + unpack_pointer (type, valaddr + embedded_offset)); common_val_print (deref_val, stream, format, deref_ref, recurse, pretty, current_language); } diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 4cbb7888a5a..69c3395c482 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -444,8 +444,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, struct value *deref_val = value_at (TYPE_TARGET_TYPE (type), - unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr + embedded_offset)); + unpack_pointer (type, valaddr + embedded_offset)); common_val_print (deref_val, stream, format, deref_ref, recurse, pretty, current_language); } diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c index 1258d07bfae..e09ec2153ff 100644 --- a/gdb/m2-valprint.c +++ b/gdb/m2-valprint.c @@ -258,10 +258,7 @@ print_variable_at_address (struct type *type, if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF) { struct value *deref_val = - value_at - (TYPE_TARGET_TYPE (type), - unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr)); + value_at (TYPE_TARGET_TYPE (type), unpack_pointer (type, valaddr)); common_val_print (deref_val, stream, format, deref_ref, recurse, pretty, current_language); } @@ -420,8 +417,7 @@ m2_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, struct value *deref_val = value_at (TYPE_TARGET_TYPE (type), - unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr + embedded_offset)); + unpack_pointer (type, valaddr + embedded_offset)); common_val_print (deref_val, stream, format, deref_ref, recurse, pretty, current_language); } diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 23a04dab3dc..f76bf566a14 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -267,8 +267,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, struct value *deref_val = value_at (TYPE_TARGET_TYPE (type), - unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr + embedded_offset)); + unpack_pointer (type, valaddr + embedded_offset)); common_val_print (deref_val, stream, format, deref_ref, recurse + 1, pretty, current_language); }