This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[6/10] Remove main builtin_type_ global variables.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 9 Jun 2007 01:16:30 +0200 (CEST)
- Subject: [6/10] Remove main builtin_type_ global variables.
Hello,
this patch is main part of removing the gdbarch-swapped builtin types.
The basic idea is to replace all global variables like builtin_type_void
with a "compatibility macro" referencing the current architecture's
builtin_type structure:
#define builtin_type_void \
(builtin_type (current_gdbarch)->builtin_void)
The previous patches have already removed all constructs where this
replacement would break (e.g. taking the address of a builtin type),
and have made sure all required types are present in builtin_type.
The one oddity uncovered here is that builtin_type_string was defined
twice, once in gdbtypes.c and once in f-lang.c. The patch removes
the duplicate definition in f-lang.c.
Bye,
Ulrich
ChangeLog:
* f-lang.c (_initialize_f_language): Do not initialize or
swap builtin_type_string.
* gdbtypes.h (builtin_type_true_char, builtin_type_void,
builtin_type_char, builtin_type_short, builtin_type_int,
builtin_type_long, builtin_type_signed_char,
builtin_type_unsigned_char, builtin_type_unsigned_short,
builtin_type_unsigned_int, builtin_type_unsigned_long,
builtin_type_float, builtin_type_double, builtin_type_long_double,
builtin_type_complex, builtin_type_double_complex, builtin_type_string,
builtin_type_bool, builtin_type_long_long,
builtin_type_unsigned_long_long, builtin_type_void_data_ptr,
builtin_type_void_func_ptr, builtin_type_CORE_ADDR,
builtin_type_bfd_vma, builtin_type_int0, builtin_type_int8,
builtin_type_uint8, builtin_type_int16, builtin_type_uint16,
builtin_type_int32, builtin_type_uint32, builtin_type_int64,
builtin_type_uint64, builtin_type_int128, builtin_type_uint128,
builtin_type_ieee_single, builtin_type_ieee_double,
builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
builtin_type_ia64_spill, builtin_type_ia64_quad): Replace global
variable declaration with compatibility macro.
* gdbtypes.c (builtin_type_true_char, builtin_type_void,
builtin_type_char, builtin_type_short, builtin_type_int,
builtin_type_long, builtin_type_signed_char,
builtin_type_unsigned_char, builtin_type_unsigned_short,
builtin_type_unsigned_int, builtin_type_unsigned_long,
builtin_type_float, builtin_type_double, builtin_type_long_double,
builtin_type_complex, builtin_type_double_complex, builtin_type_string,
builtin_type_bool, builtin_type_long_long,
builtin_type_unsigned_long_long, builtin_type_void_data_ptr,
builtin_type_void_func_ptr, builtin_type_CORE_ADDR,
builtin_type_bfd_vma, builtin_type_int0, builtin_type_int8,
builtin_type_uint8, builtin_type_int16, builtin_type_uint16,
builtin_type_int32, builtin_type_uint32, builtin_type_int64,
builtin_type_uint64, builtin_type_int128, builtin_type_uint128,
builtin_type_ieee_single, builtin_type_ieee_double,
builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
(build_gdbtypes): Remove.
(_initialize_gdbtypes): Remove data type initialization. Do not call
build_gdbtypes. Move installing opaque-type-resolution command here.
diff -urNp gdb-orig/gdb/f-lang.c gdb-head/gdb/f-lang.c
--- gdb-orig/gdb/f-lang.c 2007-06-08 19:28:55.562766220 +0200
+++ gdb-head/gdb/f-lang.c 2007-06-08 19:28:08.149412488 +0200
@@ -609,14 +609,8 @@ _initialize_f_language (void)
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_f_complex_s16);
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_f_complex_s32);
DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_f_void);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_string);
deprecated_register_gdbarch_swap (NULL, 0, build_fortran_types);
- builtin_type_string =
- init_type (TYPE_CODE_STRING, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0,
- "character string", (struct objfile *) NULL);
-
add_language (&f_language_defn);
}
diff -urNp gdb-orig/gdb/gdbtypes.c gdb-head/gdb/gdbtypes.c
--- gdb-orig/gdb/gdbtypes.c 2007-06-08 19:28:44.166678516 +0200
+++ gdb-head/gdb/gdbtypes.c 2007-06-08 19:28:08.170409465 +0200
@@ -41,40 +41,6 @@
#include "gdb_assert.h"
#include "hashtab.h"
-/* These variables point to the objects
- representing the predefined C data types. */
-
-struct type *builtin_type_void;
-struct type *builtin_type_char;
-struct type *builtin_type_true_char;
-struct type *builtin_type_short;
-struct type *builtin_type_int;
-struct type *builtin_type_long;
-struct type *builtin_type_long_long;
-struct type *builtin_type_signed_char;
-struct type *builtin_type_unsigned_char;
-struct type *builtin_type_unsigned_short;
-struct type *builtin_type_unsigned_int;
-struct type *builtin_type_unsigned_long;
-struct type *builtin_type_unsigned_long_long;
-struct type *builtin_type_float;
-struct type *builtin_type_double;
-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_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;
-struct type *builtin_type_bool;
/* Floatformat pairs. */
const struct floatformat *floatformats_ieee_single[BFD_ENDIAN_UNKNOWN] = {
@@ -118,18 +84,6 @@ const struct floatformat *floatformats_v
&floatformat_vax_d
};
-struct type *builtin_type_ieee_single;
-struct type *builtin_type_ieee_double;
-struct type *builtin_type_i387_ext;
-struct type *builtin_type_m68881_ext;
-struct type *builtin_type_arm_ext;
-struct type *builtin_type_ia64_spill;
-struct type *builtin_type_ia64_quad;
-
-struct type *builtin_type_void_data_ptr;
-struct type *builtin_type_void_func_ptr;
-struct type *builtin_type_CORE_ADDR;
-struct type *builtin_type_bfd_vma;
int opaque_type_resolution = 1;
static void
@@ -3299,141 +3253,6 @@ build_flt (int bit, char *name, const st
return t;
}
-static void
-build_gdbtypes (void)
-{
- builtin_type_void =
- init_type (TYPE_CODE_VOID, 1,
- 0,
- "void", (struct objfile *) NULL);
- builtin_type_char =
- init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- (TYPE_FLAG_NOSIGN
- | (gdbarch_char_signed (current_gdbarch) ?
- 0 : TYPE_FLAG_UNSIGNED)),
- "char", (struct objfile *) NULL);
- builtin_type_true_char =
- init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0,
- "true character", (struct objfile *) NULL);
- builtin_type_signed_char =
- init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0,
- "signed char", (struct objfile *) NULL);
- builtin_type_unsigned_char =
- init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "unsigned char", (struct objfile *) NULL);
- builtin_type_short =
- init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- 0,
- "short", (struct objfile *) NULL);
- builtin_type_unsigned_short =
- init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "unsigned short", (struct objfile *) NULL);
- builtin_type_int =
- init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0,
- "int", (struct objfile *) NULL);
- builtin_type_unsigned_int =
- init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "unsigned int", (struct objfile *) NULL);
- builtin_type_long =
- init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
- 0,
- "long", (struct objfile *) NULL);
- builtin_type_unsigned_long =
- init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "unsigned long", (struct objfile *) NULL);
- builtin_type_long_long =
- init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- 0,
- "long long", (struct objfile *) NULL);
- builtin_type_unsigned_long_long =
- init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "unsigned long long", (struct objfile *) NULL);
-
- builtin_type_float = build_flt (TARGET_FLOAT_BIT, "float",
- TARGET_FLOAT_FORMAT);
- builtin_type_double = build_flt (TARGET_DOUBLE_BIT, "double",
- TARGET_DOUBLE_FORMAT);
- builtin_type_long_double = build_flt (TARGET_LONG_DOUBLE_BIT, "long double",
- TARGET_LONG_DOUBLE_FORMAT);
-
- builtin_type_complex =
- init_type (TYPE_CODE_COMPLEX, 2 * TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
- 0,
- "complex", (struct objfile *) NULL);
- TYPE_TARGET_TYPE (builtin_type_complex) = builtin_type_float;
- builtin_type_double_complex =
- init_type (TYPE_CODE_COMPLEX, 2 * TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0,
- "double complex", (struct objfile *) NULL);
- TYPE_TARGET_TYPE (builtin_type_double_complex) = builtin_type_double;
- builtin_type_string =
- init_type (TYPE_CODE_STRING, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0,
- "string", (struct objfile *) NULL);
- builtin_type_bool =
- init_type (TYPE_CODE_BOOL, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0,
- "bool", (struct objfile *) NULL);
-
- /* Add user knob for controlling resolution of opaque types */
- add_setshow_boolean_cmd ("opaque-type-resolution", class_support,
- &opaque_type_resolution, _("\
-Set resolution of opaque struct/class/union types (if set before loading symbols)."), _("\
-Show resolution of opaque struct/class/union types (if set before loading symbols)."), NULL,
- NULL,
- show_opaque_type_resolution,
- &setlist, &showlist);
- opaque_type_resolution = 1;
-
- /* Pointer/Address types. */
-
- /* NOTE: on some targets, addresses and pointers are not necessarily
- the same --- for example, on the D10V, pointers are 16 bits long,
- but addresses are 32 bits long. See doc/gdbint.texinfo,
- ``Pointers Are Not Always Addresses''.
-
- The upshot is:
- - gdb's `struct type' always describes the target's
- representation.
- - gdb's `struct value' objects should always hold values in
- target form.
- - gdb's CORE_ADDR values are addresses in the unified virtual
- address space that the assembler and linker work with. Thus,
- since target_read_memory takes a CORE_ADDR as an argument, it
- can access any memory on the target, even if the processor has
- separate code and data address spaces.
-
- So, for example:
- - If v is a value holding a D10V code pointer, its contents are
- in target form: a big-endian address left-shifted two bits.
- - If p is a D10V pointer type, TYPE_LENGTH (p) == 2, just as
- sizeof (void *) == 2 on the target.
-
- In this context, builtin_type_CORE_ADDR is a bit odd: it's a
- target type for a value the target will never see. It's only
- used to hold the values of (typeless) linker symbols, which are
- indeed in the unified virtual address space. */
- builtin_type_void_data_ptr = make_pointer_type (builtin_type_void, NULL);
- builtin_type_void_func_ptr
- = lookup_pointer_type (lookup_function_type (builtin_type_void));
- builtin_type_CORE_ADDR =
- init_type (TYPE_CODE_INT, TARGET_ADDR_BIT / 8,
- TYPE_FLAG_UNSIGNED,
- "__CORE_ADDR", (struct objfile *) NULL);
- builtin_type_bfd_vma =
- init_type (TYPE_CODE_INT, TARGET_BFD_VMA_BIT / 8,
- TYPE_FLAG_UNSIGNED,
- "__bfd_vma", (struct objfile *) NULL);
-}
-
static struct gdbarch_data *gdbtypes_data;
const struct builtin_type *
@@ -3658,110 +3477,16 @@ extern void _initialize_gdbtypes (void);
void
_initialize_gdbtypes (void)
{
- struct cmd_list_element *c;
-
- /* FIXME: Why don't the following types need to be arch-swapped?
- See the comment at the top of the calls to
- DEPRECATED_REGISTER_GDBARCH_SWAP below. */
- 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,
- 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);
- 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);
-
- build_gdbtypes ();
-
gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init);
- /* FIXME - For the moment, handle types by swapping them in and out.
- Should be using the per-architecture data-pointer and a large
- struct.
-
- Note that any type T that we might create a 'T *' type for must
- be arch-swapped: we cache a type's 'T *' type in the pointer_type
- field, so if we change architectures but don't swap T, then
- lookup_pointer_type will start handing out pointer types made for
- a different architecture. */
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_void);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_char);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_short);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_int);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_long);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_long_long);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_signed_char);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_unsigned_char);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_unsigned_short);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_unsigned_int);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_unsigned_long);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_unsigned_long_long);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_float);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_double);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_long_double);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_complex);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_double_complex);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_string);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_void_data_ptr);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_void_func_ptr);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_CORE_ADDR);
- DEPRECATED_REGISTER_GDBARCH_SWAP (builtin_type_bfd_vma);
- deprecated_register_gdbarch_swap (NULL, 0, build_gdbtypes);
-
- /* Note: These types do not need to be swapped - they are target
- neutral. FIXME: Are you sure? See the comment above the calls
- to DEPRECATED_REGISTER_GDBARCH_SWAP above. */
- builtin_type_ieee_single
- = build_flt (-1, "builtin_type_ieee_single", floatformats_ieee_single);
- builtin_type_ieee_double
- = build_flt (-1, "builtin_type_ieee_double", floatformats_ieee_double);
- builtin_type_i387_ext
- = build_flt (-1, "builtin_type_i387_ext", floatformats_i387_ext);
- builtin_type_m68881_ext
- = build_flt (-1, "builtin_type_m68881_ext", floatformats_m68881_ext);
- builtin_type_arm_ext
- = build_flt (-1, "builtin_type_arm_ext", floatformats_arm_ext);
- builtin_type_ia64_spill
- = build_flt (-1, "builtin_type_ia64_spill", floatformats_ia64_spill);
- builtin_type_ia64_quad
- = build_flt (-1, "builtin_type_ia64_quad", floatformats_ia64_quad);
+ /* Add user knob for controlling resolution of opaque types */
+ add_setshow_boolean_cmd ("opaque-type-resolution", class_support,
+ &opaque_type_resolution, _("\
+Set resolution of opaque struct/class/union types (if set before loading symbols)."), _("\
+Show resolution of opaque struct/class/union types (if set before loading symbols)."), NULL,
+ NULL,
+ show_opaque_type_resolution,
+ &setlist, &showlist);
add_setshow_zinteger_cmd ("overload", no_class, &overload_debug, _("\
Set debugging of C++ overloading."), _("\
diff -urNp gdb-orig/gdb/gdbtypes.h gdb-head/gdb/gdbtypes.h
--- gdb-orig/gdb/gdbtypes.h 2007-06-08 19:28:44.176677077 +0200
+++ gdb-head/gdb/gdbtypes.h 2007-06-08 19:28:08.183407593 +0200
@@ -1071,61 +1071,92 @@ struct builtin_type
/* Return the type table for the specified architecture. */
extern const struct builtin_type *builtin_type (struct gdbarch *gdbarch);
-/* Implicit sizes */
-extern struct type *builtin_type_void;
-extern struct type *builtin_type_char;
-extern struct type *builtin_type_short;
-extern struct type *builtin_type_int;
-extern struct type *builtin_type_long;
-extern struct type *builtin_type_signed_char;
-extern struct type *builtin_type_unsigned_char;
-extern struct type *builtin_type_unsigned_short;
-extern struct type *builtin_type_unsigned_int;
-extern struct type *builtin_type_unsigned_long;
-extern struct type *builtin_type_float;
-extern struct type *builtin_type_double;
-extern struct type *builtin_type_long_double;
-extern struct type *builtin_type_complex;
-extern struct type *builtin_type_double_complex;
-extern struct type *builtin_type_string;
-extern struct type *builtin_type_bool;
-
-/* Address/pointer types: */
-/* (C) Language `pointer to data' type. Some target platforms use an
- implicitly {sign,zero} -extended 32 bit C language pointer on a 64
- bit ISA. */
-extern struct type *builtin_type_void_data_ptr;
-
-/* (C) Language `pointer to function returning void' type. Since
- ANSI, C standards have explicitly said that pointers to functions
- and pointers to data are not interconvertible --- that is, you
- can't cast a function pointer to void * and back, and expect to get
- the same value. However, all function pointer types are
- interconvertible, so void (*) () can server as a generic function
- pointer. */
-extern struct type *builtin_type_void_func_ptr;
-
-/* The target CPU's address type. This is the ISA address size. */
-extern struct type *builtin_type_CORE_ADDR;
-/* The symbol table address type. Some object file formats have a 32
- bit address type even though the TARGET has a 64 bit pointer type
- (cf MIPS). */
-extern struct type *builtin_type_bfd_vma;
-
-/* Explicit sizes - see C9X <intypes.h> for naming scheme. The "int0"
- is for when an architecture needs to describe a register that has
- no size. */
-extern struct type *builtin_type_int0;
-extern struct type *builtin_type_int8;
-extern struct type *builtin_type_uint8;
-extern struct type *builtin_type_int16;
-extern struct type *builtin_type_uint16;
-extern struct type *builtin_type_int32;
-extern struct type *builtin_type_uint32;
-extern struct type *builtin_type_int64;
-extern struct type *builtin_type_uint64;
-extern struct type *builtin_type_int128;
-extern struct type *builtin_type_uint128;
+/* Compatibility macros to access types for the current architecture. */
+#define builtin_type_void_data_ptr \
+ (builtin_type (current_gdbarch)->builtin_data_ptr)
+#define builtin_type_void_func_ptr \
+ (builtin_type (current_gdbarch)->builtin_func_ptr)
+#define builtin_type_CORE_ADDR \
+ (builtin_type (current_gdbarch)->builtin_core_addr)
+#define builtin_type_bfd_vma \
+ (builtin_type (current_gdbarch)->builtin_bfd_vma)
+#define builtin_type_true_char \
+ (builtin_type (current_gdbarch)->builtin_true_char)
+#define builtin_type_void \
+ (builtin_type (current_gdbarch)->builtin_void)
+#define builtin_type_char \
+ (builtin_type (current_gdbarch)->builtin_char)
+#define builtin_type_short \
+ (builtin_type (current_gdbarch)->builtin_short)
+#define builtin_type_int \
+ (builtin_type (current_gdbarch)->builtin_int)
+#define builtin_type_long \
+ (builtin_type (current_gdbarch)->builtin_long)
+#define builtin_type_signed_char \
+ (builtin_type (current_gdbarch)->builtin_signed_char)
+#define builtin_type_unsigned_char \
+ (builtin_type (current_gdbarch)->builtin_unsigned_char)
+#define builtin_type_unsigned_short \
+ (builtin_type (current_gdbarch)->builtin_unsigned_short)
+#define builtin_type_unsigned_int \
+ (builtin_type (current_gdbarch)->builtin_unsigned_int)
+#define builtin_type_unsigned_long \
+ (builtin_type (current_gdbarch)->builtin_unsigned_long)
+#define builtin_type_float \
+ (builtin_type (current_gdbarch)->builtin_float)
+#define builtin_type_double \
+ (builtin_type (current_gdbarch)->builtin_double)
+#define builtin_type_long_double \
+ (builtin_type (current_gdbarch)->builtin_long_double)
+#define builtin_type_complex \
+ (builtin_type (current_gdbarch)->builtin_complex)
+#define builtin_type_double_complex \
+ (builtin_type (current_gdbarch)->builtin_double_complex)
+#define builtin_type_string \
+ (builtin_type (current_gdbarch)->builtin_string)
+#define builtin_type_bool \
+ (builtin_type (current_gdbarch)->builtin_bool)
+#define builtin_type_long_long \
+ (builtin_type (current_gdbarch)->builtin_long_long)
+#define builtin_type_unsigned_long_long \
+ (builtin_type (current_gdbarch)->builtin_unsigned_long_long)
+#define builtin_type_int0 \
+ (builtin_type (current_gdbarch)->builtin_int0)
+#define builtin_type_int8 \
+ (builtin_type (current_gdbarch)->builtin_int8)
+#define builtin_type_uint8 \
+ (builtin_type (current_gdbarch)->builtin_uint8)
+#define builtin_type_int16 \
+ (builtin_type (current_gdbarch)->builtin_int16)
+#define builtin_type_uint16 \
+ (builtin_type (current_gdbarch)->builtin_uint16)
+#define builtin_type_int32 \
+ (builtin_type (current_gdbarch)->builtin_int32)
+#define builtin_type_uint32 \
+ (builtin_type (current_gdbarch)->builtin_uint32)
+#define builtin_type_int64 \
+ (builtin_type (current_gdbarch)->builtin_int64)
+#define builtin_type_uint64 \
+ (builtin_type (current_gdbarch)->builtin_uint64)
+#define builtin_type_int128 \
+ (builtin_type (current_gdbarch)->builtin_int128)
+#define builtin_type_uint128 \
+ (builtin_type (current_gdbarch)->builtin_uint128)
+#define builtin_type_ieee_single \
+ (builtin_type (current_gdbarch)->builtin_ieee_single)
+#define builtin_type_ieee_double \
+ (builtin_type (current_gdbarch)->builtin_ieee_double)
+#define builtin_type_i387_ext \
+ (builtin_type (current_gdbarch)->builtin_i387_ext)
+#define builtin_type_m68881_ext \
+ (builtin_type (current_gdbarch)->builtin_m68881_ext)
+#define builtin_type_arm_ext \
+ (builtin_type (current_gdbarch)->builtin_arm_ext)
+#define builtin_type_ia64_spill \
+ (builtin_type (current_gdbarch)->builtin_ia64_spill)
+#define builtin_type_ia64_quad \
+ (builtin_type (current_gdbarch)->builtin_ia64_quad)
+
/* Explicit floating-point formats. See "floatformat.h". */
extern const struct floatformat *floatformats_ieee_single[BFD_ENDIAN_UNKNOWN];
@@ -1139,26 +1170,12 @@ extern const struct floatformat *floatfo
extern const struct floatformat *floatformats_vax_f[BFD_ENDIAN_UNKNOWN];
extern const struct floatformat *floatformats_vax_d[BFD_ENDIAN_UNKNOWN];
-extern struct type *builtin_type_ieee_single;
-extern struct type *builtin_type_ieee_double;
-extern struct type *builtin_type_i387_ext;
-extern struct type *builtin_type_m68881_ext;
-extern struct type *builtin_type_arm_ext;
-extern struct type *builtin_type_ia64_spill;
-extern struct type *builtin_type_ia64_quad;
-
-/* We use this for the '/c' print format, because builtin_type_char is
- just a one-byte integral type, which languages less laid back than
- C will print as ... well, a one-byte integral type. */
-extern struct type *builtin_type_true_char;
/* This type represents a type that was unrecognized in symbol
read-in. */
extern struct type *builtin_type_error;
-extern struct type *builtin_type_long_long;
-extern struct type *builtin_type_unsigned_long_long;
/* Modula-2 types */
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com