The type alignment value is returned in 8-bit-bytes instead of target
memory addressable units. For example, on a target with 16-bit-bytes
where sizeof(int) == 1 (one addressable unit), alignof(int) currently
returns 2. After, this patch, it returns 1.
gdb/ChangeLog:
* arch-utils.c (default_type_align): Use type_length_units.
* gdbtypes.c (type_align): Use type_length_units.
+2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
+
+ * arch-utils.c (default_type_align): Use type_length_units.
+ * gdbtypes.c (type_align): Use type_length_units.
+
2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* cli/cli-script.c (_initialize_cli_script): Fix online documentation
ULONGEST
default_type_align (struct gdbarch *gdbarch, struct type *type)
{
- return TYPE_LENGTH (check_typedef (type));
+ return type_length_units (check_typedef (type));
}
void
case TYPE_CODE_METHODPTR:
case TYPE_CODE_MEMBERPTR:
- align = TYPE_LENGTH (type);
+ align = type_length_units (type);
break;
case TYPE_CODE_VOID: