*/
#include "hashtab.h"
-#include "common/array-view.h"
-#include "common/offset-type.h"
-#include "common/enum-flags.h"
-#include "common/underlying.h"
-#include "common/print-utils.h"
-#include "gdbarch.h"
+#include "gdbsupport/array-view.h"
+#include "gdbsupport/offset-type.h"
+#include "gdbsupport/enum-flags.h"
+#include "gdbsupport/underlying.h"
+#include "gdbsupport/print-utils.h"
/* Forward declarations for prototypes. */
struct field;
#define TYPE_NOSIGN(t) (TYPE_MAIN_TYPE (t)->flag_nosign)
+/* * A compiler may supply dwarf instrumentation
+ that indicates the desired endian interpretation of the variable
+ differs from the native endian representation. */
+
+#define TYPE_ENDIANITY_NOT_DEFAULT(t) (TYPE_MAIN_TYPE (t)->flag_endianity_not_default)
+
/* * This appears in a type's flags word if it is a stub type (e.g.,
if someone referenced a type that wasn't defined in a source file
via (struct sir_not_appearing_in_this_film *)). */
#define TYPE_GNU_IFUNC(t) (TYPE_MAIN_TYPE (t)->flag_gnu_ifunc)
/* * Type owner. If TYPE_OBJFILE_OWNED is true, the type is owned by
- the objfile retrieved as TYPE_OBJFILE. Otherweise, the type is
+ the objfile retrieved as TYPE_OBJFILE. Otherwise, the type is
owned by an architecture; TYPE_OBJFILE is NULL in this case. */
#define TYPE_OBJFILE_OWNED(t) (TYPE_MAIN_TYPE (t)->flag_objfile_owned)
#define TYPE_IS_REFERENCE(t) \
(TYPE_CODE (t) == TYPE_CODE_REF || TYPE_CODE (t) == TYPE_CODE_RVALUE_REF)
+/* * True if this type is allocatable. */
+#define TYPE_IS_ALLOCATABLE(t) \
+ (get_dyn_prop (DYN_PROP_ALLOCATED, t) != NULL)
+
/* * Instruction-space delimited type. This is for Harvard architectures
which have separate instruction and data address spaces (and perhaps
others).
struct dynamic_prop high;
+ /* * The bias. Sometimes a range value is biased before storage.
+ The bias is added to the stored bits to form the true value. */
+
+ LONGEST bias;
+
/* True if HIGH range bound contains the number of elements in the
- subrange. This affects how the final hight bound is computed. */
+ subrange. This affects how the final high bound is computed. */
int flag_upper_bound_is_count : 1;
unsigned int flag_gnu_ifunc : 1;
unsigned int flag_fixed_instance : 1;
unsigned int flag_objfile_owned : 1;
+ unsigned int flag_endianity_not_default : 1;
/* * True if this type was declared with "class" rather than
"struct". */
type_length_units function should be used in order to get the length
expressed in target addressable memory units. */
- unsigned int length;
+ ULONGEST length;
/* * Core type, shared by a group of qualified types. */
(TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_CPLUS_STUFF \
&& TYPE_RAW_CPLUS_SPECIFIC (type) != &cplus_struct_default)
+#define INIT_NONE_SPECIFIC(type) \
+ (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_NONE, \
+ TYPE_MAIN_TYPE (type)->type_specific = {})
+
extern const struct gnat_aux_type gnat_aux_default;
extern void allocate_gnat_aux_type (struct type *);
#define HAVE_GNAT_AUX_INFO(type) \
(TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_GNAT_STUFF)
+/* * True if TYPE is known to be an Ada type of some kind. */
+#define ADA_TYPE_P(type) \
+ (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_GNAT_STUFF \
+ || (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_NONE \
+ && TYPE_FIXED_INSTANCE (type)))
+
#define INIT_FUNC_SPECIFIC(type) \
(TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_FUNC, \
TYPE_MAIN_TYPE (type)->type_specific.func_stuff = (struct func_type *) \
dynprop->kind
-/* Moto-specific stuff for FORTRAN arrays. */
+/* Accessors for struct range_bounds data attached to an array type's
+ index type. */
#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \
TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
struct type *builtin_unsigned_short;
struct type *builtin_unsigned_int;
struct type *builtin_unsigned_long;
+ struct type *builtin_half;
struct type *builtin_float;
struct type *builtin_double;
struct type *builtin_long_double;
struct type *builtin_unsigned_int;
struct type *builtin_unsigned_long;
struct type *builtin_unsigned_long_long;
+ struct type *builtin_half;
struct type *builtin_float;
struct type *builtin_double;
struct type *builtin_long_double;
extern void replace_type (struct type *, struct type *);
-extern int address_space_name_to_int (struct gdbarch *, char *);
+extern int address_space_name_to_int (struct gdbarch *, const char *);
extern const char *address_space_int_to_name (struct gdbarch *, int);
extern struct type *create_range_type (struct type *, struct type *,
const struct dynamic_prop *,
- const struct dynamic_prop *);
+ const struct dynamic_prop *,
+ LONGEST);
extern struct type *create_array_type (struct type *, struct type *,
struct type *);
struct gdbarch *, const char *,
const struct block *, int);
-extern struct type *lookup_template_type (char *, struct type *,
+extern struct type *lookup_template_type (const char *, struct type *,
const struct block *);
extern int get_vptr_fieldno (struct type *, struct type **);
extern int type_not_associated (const struct type *type);
+/* * When the type includes explicit byte ordering, return that.
+ Otherwise, the byte ordering from gdbarch_byte_order for
+ get_type_arch is returned. */
+
+extern enum bfd_endian type_byte_order (const struct type *type);
+
+/* A flag to enable printing of debugging information of C++
+ overloading. */
+
+extern unsigned int overload_debug;
+
#endif /* GDBTYPES_H */