/* Internal type definitions for GDB.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
TYPE_CODE_NAMESPACE, /* C++ namespace. */
- TYPE_CODE_DECFLOAT /* Decimal floating point. */
+ TYPE_CODE_DECFLOAT, /* Decimal floating point. */
+
+ /* Internal function type. */
+ TYPE_CODE_INTERNAL_FUNCTION
};
/* For now allow source to use TYPE_CODE_CLASS for C++ classes, as an
/* Moto-specific stuff for FORTRAN arrays */
#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \
- (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),1))
+ (TYPE_FIELD_ARTIFICIAL(TYPE_INDEX_TYPE((arraytype)),1))
#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype) \
- (TYPE_FIELD_ARTIFICIAL((TYPE_FIELD_TYPE((arraytype),0)),0))
+ (TYPE_FIELD_ARTIFICIAL(TYPE_INDEX_TYPE((arraytype)),0))
#define TYPE_ARRAY_UPPER_BOUND_VALUE(arraytype) \
- (TYPE_FIELD_BITPOS((TYPE_FIELD_TYPE((arraytype),0)),1))
+ (TYPE_HIGH_BOUND(TYPE_INDEX_TYPE((arraytype))))
#define TYPE_ARRAY_LOWER_BOUND_VALUE(arraytype) \
- (TYPE_FIELD_BITPOS((TYPE_FIELD_TYPE((arraytype),0)),0))
+ (TYPE_LOW_BOUND(TYPE_INDEX_TYPE((arraytype))))
/* C++ */
extern struct type *init_composite_type (char *name, enum type_code code);
extern void append_composite_type_field (struct type *t, char *name,
struct type *field);
+extern void append_composite_type_field_aligned (struct type *t,
+ char *name,
+ struct type *field,
+ int alignment);
/* Helper functions to construct a bit flags type. An initially empty
type is created using init_flag_type(). Flags are then added using
extern struct type *lookup_pointer_type (struct type *);
-extern struct type *make_function_type (struct type *, struct type **);
+extern struct type *make_function_type (struct type *, struct type **,
+ struct objfile *);
extern struct type *lookup_function_type (struct type *);
extern struct type *check_typedef (struct type *);
-#define CHECK_TYPEDEF(TYPE) (TYPE) = check_typedef (TYPE)
+#define CHECK_TYPEDEF(TYPE) \
+ do { \
+ (TYPE) = check_typedef (TYPE); \
+ } while (0)
extern void check_stub_method_group (struct type *, int);