* gdbtypes.c (append_composite_type_field): Correct the location of
appended fields.
This commit is contained in:
parent
58d4abe16b
commit
87f707814c
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* gdbtypes.c (append_composite_type_field): Correct the location of
|
||||||
|
appended fields.
|
||||||
|
|
||||||
2009-01-09 Pedro Alves <pedro@codesourcery.com>
|
2009-01-09 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* defs.h (deprecated_error_hook): Delete declaration.
|
* defs.h (deprecated_error_hook): Delete declaration.
|
||||||
|
|
|
@ -1856,10 +1856,9 @@ append_composite_type_field (struct type *t, char *name,
|
||||||
{
|
{
|
||||||
TYPE_LENGTH (t) = TYPE_LENGTH (t) + TYPE_LENGTH (field);
|
TYPE_LENGTH (t) = TYPE_LENGTH (t) + TYPE_LENGTH (field);
|
||||||
if (TYPE_NFIELDS (t) > 1)
|
if (TYPE_NFIELDS (t) > 1)
|
||||||
{
|
|
||||||
FIELD_BITPOS (f[0]) = (FIELD_BITPOS (f[-1])
|
FIELD_BITPOS (f[0]) = (FIELD_BITPOS (f[-1])
|
||||||
+ TYPE_LENGTH (field) * TARGET_CHAR_BIT);
|
+ (TYPE_LENGTH (FIELD_TYPE (f[-1]))
|
||||||
}
|
* TARGET_CHAR_BIT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue