From: Pedro Alves Date: Fri, 9 Jan 2009 17:41:53 +0000 (+0000) Subject: * gdbtypes.c (append_composite_type_field): Correct the location of X-Git-Tag: sid-snapshot-20090201~230 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87f707814cb2289f4178999975b54ab5e736eecc;p=platform%2Fupstream%2Fbinutils.git * gdbtypes.c (append_composite_type_field): Correct the location of appended fields. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e2eeb67..9ddb709 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-01-09 Daniel Jacobowitz + + * gdbtypes.c (append_composite_type_field): Correct the location of + appended fields. + 2009-01-09 Pedro Alves * defs.h (deprecated_error_hook): Delete declaration. diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index c4e3646..790442c 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1856,10 +1856,9 @@ append_composite_type_field (struct type *t, char *name, { TYPE_LENGTH (t) = TYPE_LENGTH (t) + TYPE_LENGTH (field); if (TYPE_NFIELDS (t) > 1) - { - FIELD_BITPOS (f[0]) = (FIELD_BITPOS (f[-1]) - + TYPE_LENGTH (field) * TARGET_CHAR_BIT); - } + FIELD_BITPOS (f[0]) = (FIELD_BITPOS (f[-1]) + + (TYPE_LENGTH (FIELD_TYPE (f[-1])) + * TARGET_CHAR_BIT)); } }