diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2015-06-12 16:51:51 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2015-06-12 16:51:51 -0400 |
commit | 3374165f51fa3cc3ce1b1bf8c72293464da9d511 (patch) | |
tree | b5a791fa52f1eea0685a16214a30c62d84c10cf1 /gdb/arch-utils.c | |
parent | 99a2c56121247207d4846fe7e28b5e7e18e0bfa0 (diff) | |
download | gdb-3374165f51fa3cc3ce1b1bf8c72293464da9d511.zip gdb-3374165f51fa3cc3ce1b1bf8c72293464da9d511.tar.gz gdb-3374165f51fa3cc3ce1b1bf8c72293464da9d511.tar.bz2 |
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.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r-- | gdb/arch-utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 7f07e21..e9c622d 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -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; |