diff options
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index c204cf0..17f6b07 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2611,6 +2611,117 @@ extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, i #endif #endif +#if defined (ADDRESS_CLASS_TYPE_FLAGS) +/* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */ +#if !defined (ADDRESS_CLASS_TYPE_FLAGS_P) +#define ADDRESS_CLASS_TYPE_FLAGS_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_P) +#define ADDRESS_CLASS_TYPE_FLAGS_P() (0) +#endif + +extern int gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_P) +#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_P) +#define ADDRESS_CLASS_TYPE_FLAGS_P() (gdbarch_address_class_type_flags_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS) +#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS"), 0) +#endif + +typedef int (gdbarch_address_class_type_flags_ftype) (int byte_size, int dwarf2_addr_class); +extern int gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class); +extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_ftype *address_class_type_flags); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS) +#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS" +#endif +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS) +#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class)) +#endif +#endif + +#if defined (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME) +/* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS_TO_NAME */ +#if !defined (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P) +#define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P) +#define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P() (0) +#endif + +extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P) +#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS_TO_NAME" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P) +#define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P() (gdbarch_address_class_type_flags_to_name_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME) +#define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME(type_flags) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_TYPE_FLAGS_TO_NAME"), 0) +#endif + +typedef char * (gdbarch_address_class_type_flags_to_name_ftype) (int type_flags); +extern char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags); +extern void set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME) +#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS_TO_NAME" +#endif +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME) +#define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME(type_flags) (gdbarch_address_class_type_flags_to_name (current_gdbarch, type_flags)) +#endif +#endif + +#if defined (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS) +/* Legacy for systems yet to multi-arch ADDRESS_CLASS_NAME_TO_TYPE_FLAGS */ +#if !defined (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P) +#define ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P) +#define ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P() (0) +#endif + +extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P) +#error "Non multi-arch definition of ADDRESS_CLASS_NAME_TO_TYPE_FLAGS" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P) +#define ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P() (gdbarch_address_class_name_to_type_flags_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS) +#define ADDRESS_CLASS_NAME_TO_TYPE_FLAGS(name, type_flags_ptr) (internal_error (__FILE__, __LINE__, "ADDRESS_CLASS_NAME_TO_TYPE_FLAGS"), 0) +#endif + +typedef int (gdbarch_address_class_name_to_type_flags_ftype) (char *name, int *type_flags_ptr); +extern int gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr); +extern void set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS) +#error "Non multi-arch definition of ADDRESS_CLASS_NAME_TO_TYPE_FLAGS" +#endif +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS) +#define ADDRESS_CLASS_NAME_TO_TYPE_FLAGS(name, type_flags_ptr) (gdbarch_address_class_name_to_type_flags (current_gdbarch, name, type_flags_ptr)) +#endif +#endif + extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); |