aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2018-06-14 18:23:39 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2018-06-14 18:24:55 -0400
commit55c748a1c01f33cec0f762969db1bae457e8bcca (patch)
tree792b220c5d4b545a1c10c9a9f311721e8b7980ed /gdb/arch-utils.c
parentb9a3c020eab9f6e73a439592b3ba8f8cdadcaa1e (diff)
downloadgdb-55c748a1c01f33cec0f762969db1bae457e8bcca.zip
gdb-55c748a1c01f33cec0f762969db1bae457e8bcca.tar.gz
gdb-55c748a1c01f33cec0f762969db1bae457e8bcca.tar.bz2
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.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 76bc16f..a65f01f 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -994,7 +994,7 @@ default_in_indirect_branch_thunk (gdbarch *gdbarch, CORE_ADDR pc)
ULONGEST
default_type_align (struct gdbarch *gdbarch, struct type *type)
{
- return TYPE_LENGTH (check_typedef (type));
+ return type_length_units (check_typedef (type));
}
void