diff options
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r-- | gdb/arch-utils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index e1d5afd6039..5bb9c758449 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -1005,13 +1005,15 @@ default_gnu_triplet_regexp (struct gdbarch *gdbarch) return gdbarch_bfd_arch_info (gdbarch)->arch_name; } -/* Default method for gdbarch_addressable_memory_unit_size. By default, a memory byte has - a size of 1 octet. */ +/* Default method for gdbarch_addressable_memory_unit_size. The default is + based on the bits_per_byte defined in the bfd library for the current + architecture, this is usually 8-bits, and so this function will usually + return 1 indicating 1 byte is 1 octet. */ int default_addressable_memory_unit_size (struct gdbarch *gdbarch) { - return 1; + return gdbarch_bfd_arch_info (gdbarch)->bits_per_byte / 8; } void |