diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-16 17:23:12 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-16 17:23:12 +0000 |
commit | cad351d11d6c3f6487cd696c229731e1a7fecdf0 (patch) | |
tree | 68bb345967261a25f2a0050f704e10b541184240 /gdb/f-lang.c | |
parent | 594f77850bb22a2cec4e8fc44c7ea735a6270eb2 (diff) | |
download | gdb-cad351d11d6c3f6487cd696c229731e1a7fecdf0.zip gdb-cad351d11d6c3f6487cd696c229731e1a7fecdf0.tar.gz gdb-cad351d11d6c3f6487cd696c229731e1a7fecdf0.tar.bz2 |
* c-lang.c (cplus_builtin_types): Remove.
(enum cplus_primitive_types): New data type.
(cplus_language_arch_info): New function.
(cplus_language_defn): Set la_language_arch_info member. Do not set
la_builtin_type_vector and string_char_type members.
* f-lang.c (f_builtin_types): Remove.
(enum f_primitive_types): New data type.
(f_language_arch_info): New function.
(f_language_de): Set la_language_arch_info member. Do not set
la_builtin_type_vector and string_char_type members.
* m2-lang.c (m2_builtin_types): Remove.
(enum m2_primitive_types): New data type.
(m2_language_arch_info): New function.
(m2_language_defn): Set la_language_arch_info member. Do not set
la_builtin_type_vector and string_char_type members.
* objc-lang.c (objc_builtin_types): Remove.
(objc_language): Set la_language_arch_info member. Do not set
la_builtin_type_vector and string_char_type members.
* p-lang.c (pascal_builtin_types): Remove.
(enum pascal_primitive_types): New data type.
(pascal_language_arch_info): New function.
(pascal_language_defn): Set la_language_arch_info member. Do not set
la_builtin_type_vector and string_char_type members.
Diffstat (limited to 'gdb/f-lang.c')
-rw-r--r-- | gdb/f-lang.c | 69 |
1 files changed, 48 insertions, 21 deletions
diff --git a/gdb/f-lang.c b/gdb/f-lang.c index e6b0d6f..9f6d0ec 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -434,26 +434,53 @@ static const struct op_print f_op_print_tab[] = {NULL, 0, 0, 0} }; -struct type **const (f_builtin_types[]) = -{ - &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, -#if 0 - &builtin_type_f_complex_s32, -#endif - &builtin_type_f_void, - 0 +enum f_primitive_types { + f_primitive_type_character, + f_primitive_type_logical, + f_primitive_type_logical_s1, + f_primitive_type_logical_s2, + f_primitive_type_integer, + f_primitive_type_integer_s2, + f_primitive_type_real, + f_primitive_type_real_s8, + f_primitive_type_real_s16, + f_primitive_type_complex_s8, + f_primitive_type_complex_s16, + f_primitive_type_void, + nr_f_primitive_types }; +static void +f_language_arch_info (struct gdbarch *gdbarch, + struct language_arch_info *lai) +{ + lai->string_char_type = builtin_type_f_character; + lai->primitive_type_vector + = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_f_primitive_types + 1, + struct type *); + + lai->primitive_type_vector [f_primitive_type_character] + = builtin_type_f_character; + lai->primitive_type_vector [f_primitive_type_logical] + = builtin_type_f_logical; + lai->primitive_type_vector [f_primitive_type_logical_s1] + = builtin_type_f_logical_s1; + lai->primitive_type_vector [f_primitive_type_logical_s2] + = builtin_type_f_logical_s2; + lai->primitive_type_vector [f_primitive_type_real] + = builtin_type_f_real; + lai->primitive_type_vector [f_primitive_type_real_s8] + = builtin_type_f_real_s8; + lai->primitive_type_vector [f_primitive_type_real_s16] + = builtin_type_f_real_s16; + lai->primitive_type_vector [f_primitive_type_complex_s8] + = builtin_type_f_complex_s8; + lai->primitive_type_vector [f_primitive_type_complex_s16] + = builtin_type_f_complex_s16; + lai->primitive_type_vector [f_primitive_type_void] + = builtin_type_f_void; +} + /* This is declared in c-lang.h but it is silly to import that file for what is already just a hack. */ extern int c_value_print (struct value *, struct ui_file *, int, @@ -463,7 +490,7 @@ const struct language_defn f_language_defn = { "fortran", language_fortran, - f_builtin_types, + NULL, range_check_on, type_check_on, case_sensitive_off, @@ -488,9 +515,9 @@ const struct language_defn f_language_defn = f_op_print_tab, /* expression operators for printing */ 0, /* arrays are first-class (not c-style) */ 1, /* String lower bound */ - &builtin_type_f_character, /* Type of string elements */ + NULL, default_word_break_characters, - NULL, /* FIXME: la_language_arch_info. */ + f_language_arch_info, default_print_array_index, LANG_MAGIC }; |