/* Internal type definitions for GDB.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
#define TYPE_FLAG_VARARGS (1 << 11)
#define TYPE_VARARGS(t) ((t)->flags & TYPE_FLAG_VARARGS)
+/* Identify a vector type. Gcc is handling this by adding an extra
+ attribute to the array type. We slurp that in as a new flag of a
+ type. This is used only in dwarf2read.c. */
+#define TYPE_FLAG_VECTOR (1 << 12)
+#define TYPE_VECTOR(t) ((t)->flags & TYPE_FLAG_VECTOR)
+
+
struct type
{
extern struct type *init_type (enum type_code, int, int, char *,
struct objfile *);
+/* Helper functions to construct a struct or record type. An
+ initially empty type is created using init_composite_type().
+ Fields are then added using append_struct_type_field(). A union
+ type has its size set to the largest field. A struct type has each
+ field packed against the previous. */
+
+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 struct type *lookup_reference_type (struct type *);
extern struct type *make_reference_type (struct type *, struct type **);
extern void finish_cv_type (struct type *);
+extern void replace_type (struct type *, struct type *);
+
extern int address_space_name_to_int (char *);
extern char *address_space_int_to_name (int);