aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c105
1 files changed, 46 insertions, 59 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 25d6321..a06f48a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -39,20 +39,6 @@
#include "gdb_assert.h"
#include "hashtab.h"
-/* These variables point to the objects
- representing the predefined C data types. */
-
-struct type *builtin_type_int0;
-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;
-struct type *builtin_type_int128;
-struct type *builtin_type_uint128;
/* Floatformat pairs. */
const struct floatformat *floatformats_ieee_single[BFD_ENDIAN_UNKNOWN] = {
@@ -3196,6 +3182,52 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
TYPE_FLAG_UNSIGNED,
"true character", (struct objfile *) NULL);
+ /* Fixed-size integer types. */
+ builtin_type->builtin_int0 =
+ init_type (TYPE_CODE_INT, 0 / 8,
+ 0,
+ "int0_t", (struct objfile *) NULL);
+ builtin_type->builtin_int8 =
+ init_type (TYPE_CODE_INT, 8 / 8,
+ TYPE_FLAG_NOTTEXT,
+ "int8_t", (struct objfile *) NULL);
+ builtin_type->builtin_uint8 =
+ init_type (TYPE_CODE_INT, 8 / 8,
+ TYPE_FLAG_UNSIGNED | TYPE_FLAG_NOTTEXT,
+ "uint8_t", (struct objfile *) NULL);
+ builtin_type->builtin_int16 =
+ init_type (TYPE_CODE_INT, 16 / 8,
+ 0,
+ "int16_t", (struct objfile *) NULL);
+ builtin_type->builtin_uint16 =
+ init_type (TYPE_CODE_INT, 16 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint16_t", (struct objfile *) NULL);
+ builtin_type->builtin_int32 =
+ init_type (TYPE_CODE_INT, 32 / 8,
+ 0,
+ "int32_t", (struct objfile *) NULL);
+ builtin_type->builtin_uint32 =
+ init_type (TYPE_CODE_INT, 32 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint32_t", (struct objfile *) NULL);
+ builtin_type->builtin_int64 =
+ init_type (TYPE_CODE_INT, 64 / 8,
+ 0,
+ "int64_t", (struct objfile *) NULL);
+ builtin_type->builtin_uint64 =
+ init_type (TYPE_CODE_INT, 64 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint64_t", (struct objfile *) NULL);
+ builtin_type->builtin_int128 =
+ init_type (TYPE_CODE_INT, 128 / 8,
+ 0,
+ "int128_t", (struct objfile *) NULL);
+ builtin_type->builtin_uint128 =
+ init_type (TYPE_CODE_INT, 128 / 8,
+ TYPE_FLAG_UNSIGNED,
+ "uint128_t", (struct objfile *) NULL);
+
/* Default data/code pointer types. */
builtin_type->builtin_data_ptr =
make_pointer_type (builtin_type->builtin_void, NULL);
@@ -3375,51 +3407,6 @@ _initialize_gdbtypes (void)
caching pointer or reference types that *are* architecture
dependent. */
- builtin_type_int0 =
- init_type (TYPE_CODE_INT, 0 / 8,
- 0,
- "int0_t", (struct objfile *) NULL);
- builtin_type_int8 =
- init_type (TYPE_CODE_INT, 8 / 8,
- TYPE_FLAG_NOTTEXT,
- "int8_t", (struct objfile *) NULL);
- builtin_type_uint8 =
- init_type (TYPE_CODE_INT, 8 / 8,
- TYPE_FLAG_UNSIGNED | TYPE_FLAG_NOTTEXT,
- "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);
- 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);
-
builtin_type_ieee_single =
build_flt (-1, "builtin_type_ieee_single", floatformats_ieee_single);
builtin_type_ieee_double =