Thu May 21 13:14:25 1998 John Metzler <jmetzler@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / gdbtypes.c
index 2f4e411fb3022e70ebb068c8ab118071aa533b7f..416180e6498b911faad966795a09110732f110e1 100644 (file)
@@ -53,6 +53,18 @@ struct type *builtin_type_long_double;
 struct type *builtin_type_complex;
 struct type *builtin_type_double_complex;
 struct type *builtin_type_string;
+struct type *builtin_type_int8;
+struct type *builtin_type_uint8;
+struct type *builtin_type_int16;
+struct type *builtin_type_uint16;
+struct type *builtin_type_int32;
+struct type *builtin_type_uint32;
+struct type *builtin_type_int64;
+struct type *builtin_type_uint64;
+/* start-sanitize-r5900 */
+struct type *builtin_type_int128;
+struct type *builtin_type_uint128;
+/* end-sanitize-r5900 */
 
 struct extra { char str[128]; int len; }; /* maximum extention is 128! FIXME */
 
@@ -346,6 +358,9 @@ create_range_type (result_type, index_type, low_bound, high_bound)
   TYPE_FIELD_TYPE (result_type, 0) = builtin_type_int;         /* FIXME */
   TYPE_FIELD_TYPE (result_type, 1) = builtin_type_int;         /* FIXME */
 
+  if(low_bound >= 0)
+    TYPE_FLAGS (result_type) |= TYPE_FLAG_UNSIGNED;
+
   return (result_type);
 }
 
@@ -989,7 +1004,7 @@ check_typedef (type)
       struct type *range_type;
       struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
 
-      if (TYPE_FLAGS (target_type) & TYPE_FLAG_STUB)
+      if (TYPE_FLAGS (target_type) & (TYPE_FLAG_STUB | TYPE_FLAG_TARGET_STUB))
        { }
       else if (TYPE_CODE (type) == TYPE_CODE_ARRAY
               && TYPE_NFIELDS (type) == 1
@@ -1922,4 +1937,46 @@ _initialize_gdbtypes ()
     init_type (TYPE_CODE_STRING, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
               0,
               "string", (struct objfile *) NULL);
+  builtin_type_int8 =
+    init_type (TYPE_CODE_INT, 8 / 8,
+              0,
+              "int8_t", (struct objfile *) NULL);
+  builtin_type_uint8 =
+    init_type (TYPE_CODE_INT, 8 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint8_t", (struct objfile *) NULL);
+  builtin_type_int16 =
+    init_type (TYPE_CODE_INT, 16 / 8,
+              0,
+              "int16_t", (struct objfile *) NULL);
+  builtin_type_uint16 =
+    init_type (TYPE_CODE_INT, 16 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint16_t", (struct objfile *) NULL);
+  builtin_type_int32 =
+    init_type (TYPE_CODE_INT, 32 / 8,
+              0,
+              "int32_t", (struct objfile *) NULL);
+  builtin_type_uint32 =
+    init_type (TYPE_CODE_INT, 32 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint32_t", (struct objfile *) NULL);
+  builtin_type_int64 =
+    init_type (TYPE_CODE_INT, 64 / 8,
+              0,
+              "int64_t", (struct objfile *) NULL);
+  builtin_type_uint64 =
+    init_type (TYPE_CODE_INT, 64 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint64_t", (struct objfile *) NULL);
+  /* start-sanitize-r5900 */
+  builtin_type_int128 =
+    init_type (TYPE_CODE_INT, 128 / 8,
+              0,
+              "int128_t", (struct objfile *) NULL);
+  builtin_type_uint128 =
+    init_type (TYPE_CODE_INT, 128 / 8,
+              TYPE_FLAG_UNSIGNED,
+              "uint128_t", (struct objfile *) NULL);
+  /* end-sanitize-r5900 */
 }
This page took 0.023867 seconds and 4 git commands to generate.