2003-01-13 Elena Zannoni <ezannoni@redhat.com>
[deliverable/binutils-gdb.git] / gdb / gdbtypes.h
index 5c41398aabb7f5acdb1f8fa0961d8762b7843217..4c754d6ca44b68ffab97993d910713cabb2b3e96 100644 (file)
@@ -101,14 +101,14 @@ enum type_code
     TYPE_CODE_RANGE,           /* Range (integers within spec'd bounds) */
 
     /* A string type which is like an array of character but prints
-       differently (at least for (OBSOLETE) CHILL (OBSOLETE)).  It
-       does not contain a length field as Pascal strings (for many
-       Pascals, anyway) do; if we want to deal with such strings, we
-       should use a new type code.  */
+       differently (at least for (the deleted) CHILL).  It does not
+       contain a length field as Pascal strings (for many Pascals,
+       anyway) do; if we want to deal with such strings, we should use
+       a new type code.  */
     TYPE_CODE_STRING,
 
     /* String of bits; like TYPE_CODE_SET but prints differently (at
-       least for (OBSOLETE) CHILL (OBSOLETE)).  */
+       least for (the deleted) CHILL).  */
     TYPE_CODE_BITSTRING,
 
     /* Unknown type.  The length field is valid if we were able to
@@ -253,6 +253,22 @@ enum type_code
 #define TYPE_FLAG_VECTOR       (1 << 12)
 #define TYPE_VECTOR(t)         (TYPE_FLAGS (t) & TYPE_FLAG_VECTOR)
 
+/* Address class flags.  Some environments provide for pointers whose
+   size is different from that of a normal pointer or address types
+   where the bits are interpreted differently than normal addresses.  The
+   TYPE_FLAG_ADDRESS_CLASS_n flags may be used in target specific
+   ways to represent these different types of address classes.  */
+#define TYPE_FLAG_ADDRESS_CLASS_1 (1 << 13)
+#define TYPE_ADDRESS_CLASS_1(t) (TYPE_INSTANCE_FLAGS(t) \
+                                 & TYPE_FLAG_ADDRESS_CLASS_1)
+#define TYPE_FLAG_ADDRESS_CLASS_2 (1 << 14)
+#define TYPE_ADDRESS_CLASS_2(t) (TYPE_INSTANCE_FLAGS(t) \
+                                & TYPE_FLAG_ADDRESS_CLASS_2)
+#define TYPE_FLAG_ADDRESS_CLASS_ALL (TYPE_FLAG_ADDRESS_CLASS_1 \
+                                    | TYPE_FLAG_ADDRESS_CLASS_2)
+#define TYPE_ADDRESS_CLASS_ALL(t) (TYPE_INSTANCE_FLAGS(t) \
+                                  & TYPE_FLAG_ADDRESS_CLASS_ALL)
+
 struct main_type
 {
   /* Code for kind of type */
@@ -381,22 +397,25 @@ struct main_type
 
       CORE_ADDR physaddr;
       char *physname;
-
-      /* For a function or member type, this is 1 if the argument is marked
-        artificial.  Artificial arguments should not be shown to the
-        user.  */
-      int artificial;
     }
     loc;
 
+    /* For a function or member type, this is 1 if the argument is marked
+       artificial.  Artificial arguments should not be shown to the
+       user.  */
+    unsigned int artificial : 1;
+
+    /* This flag is zero for non-static fields, 1 for fields whose location
+       is specified by the label loc.physname, and 2 for fields whose location
+       is specified by loc.physaddr.  */
+
+    unsigned int static_kind : 2;
+
     /* Size of this field, in bits, or zero if not packed.
        For an unpacked field, the field's type's length
-       says how many bytes the field occupies.
-       A value of -1 or -2 indicates a static field;  -1 means the location
-       is specified by the label loc.physname;  -2 means that loc.physaddr
-       specifies the actual address. */
+       says how many bytes the field occupies.  */
 
-    int bitsize;
+    unsigned int bitsize : 29;
 
     /* In a struct or union type, type of this field.
        In a function or member type, type of this argument.
@@ -793,14 +812,15 @@ extern void allocate_cplus_struct_type (struct type *);
 #define FIELD_TYPE(thisfld) ((thisfld).type)
 #define FIELD_NAME(thisfld) ((thisfld).name)
 #define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
-#define FIELD_ARTIFICIAL(thisfld) ((thisfld).loc.artificial)
+#define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial)
 #define FIELD_BITSIZE(thisfld) ((thisfld).bitsize)
+#define FIELD_STATIC_KIND(thisfld) ((thisfld).static_kind)
 #define FIELD_PHYSNAME(thisfld) ((thisfld).loc.physname)
 #define FIELD_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
 #define SET_FIELD_PHYSNAME(thisfld, name) \
-  ((thisfld).bitsize = -1, FIELD_PHYSNAME(thisfld) = (name))
+  ((thisfld).static_kind = 1, FIELD_PHYSNAME(thisfld) = (name))
 #define SET_FIELD_PHYSADDR(thisfld, name) \
-  ((thisfld).bitsize = -2, FIELD_PHYSADDR(thisfld) = (name))
+  ((thisfld).static_kind = 2, FIELD_PHYSADDR(thisfld) = (name))
 #define TYPE_FIELD(thistype, n) TYPE_MAIN_TYPE(thistype)->fields[n]
 #define TYPE_FIELD_TYPE(thistype, n) FIELD_TYPE(TYPE_FIELD(thistype, n))
 #define TYPE_FIELD_NAME(thistype, n) FIELD_NAME(TYPE_FIELD(thistype, n))
@@ -840,8 +860,9 @@ extern void allocate_cplus_struct_type (struct type *);
   (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
     : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n)))
 
-#define TYPE_FIELD_STATIC(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].bitsize < 0)
-#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].bitsize == -2)
+#define TYPE_FIELD_STATIC(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind != 0)
+#define TYPE_FIELD_STATIC_KIND(thistype, n) TYPE_MAIN_TYPE (thistype)->fields[n].static_kind
+#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind == 2)
 #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_PHYSNAME(TYPE_FIELD(thistype, n))
 #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_PHYSADDR(TYPE_FIELD(thistype, n))
 
@@ -999,14 +1020,6 @@ extern struct type *builtin_type_m2_card;
 extern struct type *builtin_type_m2_real;
 extern struct type *builtin_type_m2_bool;
 
-/* OBSOLETE Chill types */
-
-/* OBSOLETE extern struct type *builtin_type_chill_bool; */
-/* OBSOLETE extern struct type *builtin_type_chill_char; */
-/* OBSOLETE extern struct type *builtin_type_chill_long; */
-/* OBSOLETE extern struct type *builtin_type_chill_ulong; */
-/* OBSOLETE extern struct type *builtin_type_chill_real; */
-
 /* Fortran (F77) types */
 
 extern struct type *builtin_type_f_character;
@@ -1075,7 +1088,7 @@ extern void replace_type (struct type *, struct type *);
 
 extern int address_space_name_to_int (char *);
 
-extern char *address_space_int_to_name (int);
+extern const char *address_space_int_to_name (int);
 
 extern struct type *make_type_with_address_space (struct type *type, 
                                                  int space_identifier);
@@ -1114,8 +1127,6 @@ extern struct type *create_string_type (struct type *, struct type *);
 
 extern struct type *create_set_type (struct type *, struct type *);
 
-/* OBSOLETE extern int chill_varying_type (struct type *); */
-
 extern struct type *lookup_unsigned_typename (char *);
 
 extern struct type *lookup_signed_typename (char *);
@@ -1124,7 +1135,7 @@ extern struct type *check_typedef (struct type *);
 
 #define CHECK_TYPEDEF(TYPE) (TYPE) = check_typedef (TYPE)
 
-extern void check_stub_method (struct type *, int, int);
+extern void check_stub_method_group (struct type *, int);
 
 extern struct type *lookup_primitive_typename (char *);
 
This page took 0.027733 seconds and 4 git commands to generate.