mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
gdbarch: add addressable_memory_unit_size method
Add a new gdbarch method to get the length of an addressable memory unit for a given architecture. The default implementation returns 1. gdb/ChangeLog: * arch-utils.h (default_addressable_memory_unit_size): New. * arch-utils.c (default_addressable_memory_unit_size): New. * gdbarch.sh (addressable_memory_unit_size): New. * gdbarch.h: Re-generate. * gdbarch.c: Re-generate.
This commit is contained in:
@@ -888,6 +888,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. */
|
||||
|
||||
int
|
||||
default_addressable_memory_unit_size (struct gdbarch *gdbarch)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* -Wmissing-prototypes */
|
||||
extern initialize_file_ftype _initialize_gdbarch_utils;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user