2007-10-25 Wu Zhou <woodzltc@cn.ibm.com>
[binutils-gdb.git] / gdb / gdbtypes.h
index 8d60894fc413e66d92ebf1ef5668320c0491b48a..b1e8558451de6f1b25d98c6ccc773bf50fbfff92 100644 (file)
@@ -9,7 +9,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -18,9 +18,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #if !defined (GDBTYPES_H)
 #define GDBTYPES_H 1
@@ -67,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.  */
 
@@ -171,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
@@ -327,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
 {
@@ -1011,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;
@@ -1036,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.  */
@@ -1263,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 *);
@@ -1346,8 +1362,6 @@ extern int has_vtable (struct type *);
 
 extern struct type *primary_base_class (struct type *);
 
-extern struct type **virtual_base_list (struct type *);
-
 extern int virtual_base_list_length (struct type *);
 extern int virtual_base_list_length_skip_primaries (struct type *);