Remove some code duplication in py-objfile.c, py-progspace.c.
[binutils-gdb.git] / gdb / gdbtypes.h
index bb6352d74a1f1cb2aff06f481fbc4f847f945c1b..bd1a0ab2fe0b1ee09592d309618c0e1563d29bd7 100644 (file)
@@ -132,10 +132,9 @@ 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 (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.  */
+       differently.  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,
 
     /* * Unknown type.  The length field is valid if we were able to
@@ -725,6 +724,11 @@ struct main_type
 
     struct func_type *func_stuff;
   } type_specific;
+
+  /* * Contains a location description value for the current type. Evaluating
+     this field yields to the location of the data for an object.  */
+
+  struct dynamic_prop *data_location;
 };
 
 /* * A ``struct type'' describes a particular instance of a type, with
@@ -1204,6 +1208,16 @@ extern void allocate_gnat_aux_type (struct type *);
 #define TYPE_LOW_BOUND_KIND(range_type) \
   TYPE_RANGE_DATA(range_type)->low.kind
 
+/* Attribute accessors for the type data location.  */
+#define TYPE_DATA_LOCATION(thistype) \
+  TYPE_MAIN_TYPE(thistype)->data_location
+#define TYPE_DATA_LOCATION_BATON(thistype) \
+  TYPE_DATA_LOCATION (thistype)->data.baton
+#define TYPE_DATA_LOCATION_ADDR(thistype) \
+  TYPE_DATA_LOCATION (thistype)->data.const_val
+#define TYPE_DATA_LOCATION_KIND(thistype) \
+  TYPE_DATA_LOCATION (thistype)->kind
+
 /* Moto-specific stuff for FORTRAN arrays.  */
 
 #define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \