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/m2-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/m2-lang.c')
-rw-r--r-- | gdb/m2-lang.c | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index 11716b3..668106d 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -402,21 +402,41 @@ struct type *builtin_type_m2_card; struct type *builtin_type_m2_real; struct type *builtin_type_m2_bool; -struct type **const (m2_builtin_types[]) = -{ - &builtin_type_m2_char, - &builtin_type_m2_int, - &builtin_type_m2_card, - &builtin_type_m2_real, - &builtin_type_m2_bool, - 0 +enum m2_primitive_types { + m2_primitive_type_char, + m2_primitive_type_int, + m2_primitive_type_card, + m2_primitive_type_real, + m2_primitive_type_bool, + nr_m2_primitive_types }; +static void +m2_language_arch_info (struct gdbarch *gdbarch, + struct language_arch_info *lai) +{ + lai->string_char_type = builtin_type_m2_char; + lai->primitive_type_vector + = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_m2_primitive_types + 1, + struct type *); + + lai->primitive_type_vector [m2_primitive_type_char] + = builtin_type_m2_char; + lai->primitive_type_vector [m2_primitive_type_int] + = builtin_type_m2_int; + lai->primitive_type_vector [m2_primitive_type_card] + = builtin_type_m2_card; + lai->primitive_type_vector [m2_primitive_type_real] + = builtin_type_m2_real; + lai->primitive_type_vector [m2_primitive_type_bool] + = builtin_type_m2_bool; +} + const struct language_defn m2_language_defn = { "modula-2", language_m2, - m2_builtin_types, + NULL, range_check_on, type_check_on, case_sensitive_on, @@ -441,9 +461,9 @@ const struct language_defn m2_language_defn = m2_op_print_tab, /* expression operators for printing */ 0, /* arrays are first-class (not c-style) */ 0, /* String lower bound */ - &builtin_type_m2_char, /* Type of string elements */ + NULL, default_word_break_characters, - NULL, /* FIXME: la_language_arch_info. */ + m2_language_arch_info, default_print_array_index, LANG_MAGIC }; |