2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
[binutils-gdb.git] / gdb / gdbtypes.h
index 00ceb6bcf3d437de61f77f78c2d3c5e46817f39a..b1e8558451de6f1b25d98c6ccc773bf50fbfff92 100644 (file)
@@ -65,7 +65,12 @@ struct block;
 #define FT_UNSIGNED_BYTE       27
 #define FT_TEMPLATE_ARG                28
 
-#define FT_NUM_MEMBERS         29      /* Highest FT_* above, plus one. */
+/* The following three fundamental types are for decimal floating point.  */
+#define FT_DECFLOAT            29
+#define FT_DBL_PREC_DECFLOAT   30
+#define FT_EXT_PREC_DECFLOAT   31
+
+#define FT_NUM_MEMBERS         32      /* Highest FT_* above, plus one. */
 
 /* Some macros for char-based bitfields.  */
 
@@ -169,7 +174,9 @@ enum type_code
     TYPE_CODE_TEMPLATE,                /* C++ template */
     TYPE_CODE_TEMPLATE_ARG,    /* C++ template arg */
 
-    TYPE_CODE_NAMESPACE                /* C++ namespace.  */
+    TYPE_CODE_NAMESPACE,       /* C++ namespace.  */
+
+    TYPE_CODE_DECFLOAT         /* Decimal floating point.  */
   };
 
 /* For now allow source to use TYPE_CODE_CLASS for C++ classes, as an
@@ -325,6 +332,12 @@ enum type_code
 #define TYPE_FLAG_STUB_SUPPORTED (1 << 16)
 #define TYPE_STUB_SUPPORTED(t)   (TYPE_FLAGS (t) & TYPE_FLAG_STUB_SUPPORTED)
 
+/* Not textual.  By default, GDB treats all single byte integers as
+   characters (or elements of strings) unless this flag is set.  */
+
+#define TYPE_FLAG_NOTTEXT      (1 << 17)
+#define TYPE_NOTTEXT(t)                (TYPE_FLAGS (t) & TYPE_FLAG_NOTTEXT)
+
 /*  Array bound type.  */
 enum array_bound_type
 {
@@ -1009,10 +1022,11 @@ struct builtin_type
 
   /* Integral types.  */
 
-  /* We use this for the '/c' print format, because c_char is just a
+  /* We use these for the '/c' print format, because c_char is just a
      one-byte integral type, which languages less laid back than C
      will print as ... well, a one-byte integral type.  */
   struct type *builtin_true_char;
+  struct type *builtin_true_unsigned_char;
 
   /* Implicit size/sign (based on the the architecture's ABI).  */
   struct type *builtin_void;
@@ -1034,6 +1048,9 @@ struct builtin_type
   struct type *builtin_bool;
   struct type *builtin_long_long;
   struct type *builtin_unsigned_long_long;
+  struct type *builtin_decfloat;
+  struct type *builtin_decdouble;
+  struct type *builtin_declong;
 };
 
 /* Return the type table for the specified architecture.  */
@@ -1261,6 +1278,7 @@ extern void append_composite_type_field (struct type *t, char *name,
 extern struct type *init_flags_type (char *name, int length);
 extern void append_flags_type_flag (struct type *type, int bitpos, char *name);
 
+extern void make_vector_type (struct type *array_type);
 extern struct type *init_vector_type (struct type *elt_type, int n);
 
 extern struct type *lookup_reference_type (struct type *);