aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2015-06-12 16:51:51 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2015-06-12 16:51:51 -0400
commit3374165f51fa3cc3ce1b1bf8c72293464da9d511 (patch)
treeb5a791fa52f1eea0685a16214a30c62d84c10cf1 /gdb/gdbarch.h
parent99a2c56121247207d4846fe7e28b5e7e18e0bfa0 (diff)
downloadgdb-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/gdbarch.h')
-rw-r--r--gdb/gdbarch.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index d2ccd2a..7d6a0cf 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1466,6 +1466,14 @@ typedef const char * (gdbarch_gnu_triplet_regexp_ftype) (struct gdbarch *gdbarch
extern const char * gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch);
extern void set_gdbarch_gnu_triplet_regexp (struct gdbarch *gdbarch, gdbarch_gnu_triplet_regexp_ftype *gnu_triplet_regexp);
+/* Return the size in 8-bit bytes of an addressable memory unit on this
+ architecture. This corresponds to the number of 8-bit bytes associated to
+ each address in memory. */
+
+typedef int (gdbarch_addressable_memory_unit_size_ftype) (struct gdbarch *gdbarch);
+extern int gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch);
+extern void set_gdbarch_addressable_memory_unit_size (struct gdbarch *gdbarch, gdbarch_addressable_memory_unit_size_ftype *addressable_memory_unit_size);
+
/* Definition for an unknown syscall, used basically in error-cases. */
#define UNKNOWN_SYSCALL (-1)