type alignment: Use type_length_units
authorSimon Marchi <simon.marchi@ericsson.com>
Thu, 14 Jun 2018 22:23:39 +0000 (18:23 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 14 Jun 2018 22:24:55 +0000 (18:24 -0400)
commit55c748a1c01f33cec0f762969db1bae457e8bcca
tree792b220c5d4b545a1c10c9a9f311721e8b7980ed
parentb9a3c020eab9f6e73a439592b3ba8f8cdadcaa1e
type alignment: Use type_length_units

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.
gdb/ChangeLog
gdb/arch-utils.c
gdb/gdbtypes.c