aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-16 20:09:07 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-16 20:09:07 +0000
commit54ef06c7261244bfa0f99988fdb0942f72da728f (patch)
tree7f956d72caa140dd7ea2addd6b5f97abc57a8b1b /gdb/gdbtypes.h
parent92e0cef42c47d33eb559826fdeccd1e8e21e35cd (diff)
downloadfsf-binutils-gdb-54ef06c7261244bfa0f99988fdb0942f72da728f.zip
fsf-binutils-gdb-54ef06c7261244bfa0f99988fdb0942f72da728f.tar.gz
fsf-binutils-gdb-54ef06c7261244bfa0f99988fdb0942f72da728f.tar.bz2
* gdbtypes.h (builtin_type_f_character, builtin_type_f_logical,
builtin_type_f_logical_s1, builtin_type_f_logical_s2, builtin_type_f_integer, builtin_type_f_integer_s2, builtin_type_f_real, builtin_type_f_real_s8, builtin_type_f_real_s16, builtin_type_f_complex_s8, builtin_type_f_complex_s16, builtin_type_f_complex_s32, builtin_type_f_void): Replace global variable declaration with compatibility macro. (struct builtin_f_type): New data type. (builtin_f_type): Add prototype. * f-lang.c (builtin_type_f_character, builtin_type_f_logical, builtin_type_f_logical_s1, builtin_type_f_logical_s2, builtin_type_f_integer, builtin_type_f_integer_s2, builtin_type_f_real, builtin_type_f_real_s8, builtin_type_f_real_s16, builtin_type_f_complex_s8, builtin_type_f_complex_s16, builtin_type_f_complex_s32, builtin_type_f_void): Remove variables. (f_language_arch_info): Use builtin_f_type instead of variables. (build_fortran_types): Build builtin_f_type structure instead of setting global type variables. (f_type_data): New variable. (builtin_f_type): New function. (_initialize_f_language): Do not call build_fortran_types. Do not swap global type variables. Register f_type_data per-gdbarch data.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r--gdb/gdbtypes.h61
1 files changed, 48 insertions, 13 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 36bf2d6..9dd05a5 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1128,19 +1128,54 @@ extern struct type *builtin_type_m2_bool;
/* Fortran (F77) types */
-extern struct type *builtin_type_f_character;
-extern struct type *builtin_type_f_integer;
-extern struct type *builtin_type_f_integer_s2;
-extern struct type *builtin_type_f_logical;
-extern struct type *builtin_type_f_logical_s1;
-extern struct type *builtin_type_f_logical_s2;
-extern struct type *builtin_type_f_real;
-extern struct type *builtin_type_f_real_s8;
-extern struct type *builtin_type_f_real_s16;
-extern struct type *builtin_type_f_complex_s8;
-extern struct type *builtin_type_f_complex_s16;
-extern struct type *builtin_type_f_complex_s32;
-extern struct type *builtin_type_f_void;
+struct builtin_f_type
+{
+ struct type *builtin_character;
+ struct type *builtin_integer;
+ struct type *builtin_integer_s2;
+ struct type *builtin_logical;
+ struct type *builtin_logical_s1;
+ struct type *builtin_logical_s2;
+ struct type *builtin_real;
+ struct type *builtin_real_s8;
+ struct type *builtin_real_s16;
+ struct type *builtin_complex_s8;
+ struct type *builtin_complex_s16;
+ struct type *builtin_complex_s32;
+ struct type *builtin_void;
+};
+
+/* Return the Fortran type table for the specified architecture. */
+extern const struct builtin_f_type *builtin_f_type (struct gdbarch *gdbarch);
+
+/* Compatibility macros to access types for the current architecture. */
+#define builtin_type_f_character \
+ (builtin_f_type (current_gdbarch)->builtin_character)
+#define builtin_type_f_integer \
+ (builtin_f_type (current_gdbarch)->builtin_integer)
+#define builtin_type_f_integer_s2 \
+ (builtin_f_type (current_gdbarch)->builtin_integer_s2)
+#define builtin_type_f_logical \
+ (builtin_f_type (current_gdbarch)->builtin_logical)
+#define builtin_type_f_logical_s1 \
+ (builtin_f_type (current_gdbarch)->builtin_logical_s1)
+#define builtin_type_f_logical_s2 \
+ (builtin_f_type (current_gdbarch)->builtin_logical_s2)
+#define builtin_type_f_real \
+ (builtin_f_type (current_gdbarch)->builtin_real)
+#define builtin_type_f_real_s8 \
+ (builtin_f_type (current_gdbarch)->builtin_real_s8)
+#define builtin_type_f_real_s16 \
+ (builtin_f_type (current_gdbarch)->builtin_real_s16)
+#define builtin_type_f_complex_s8 \
+ (builtin_f_type (current_gdbarch)->builtin_complex_s8)
+#define builtin_type_f_complex_s16 \
+ (builtin_f_type (current_gdbarch)->builtin_complex_s16)
+#define builtin_type_f_complex_s32 \
+ (builtin_f_type (current_gdbarch)->builtin_complex_s32)
+#define builtin_type_f_void \
+ (builtin_f_type (current_gdbarch)->builtin_void)
+
/* RTTI for C++ */
/* extern struct type *builtin_type_cxx_typeinfo; */