aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-11-02 19:34:11 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-11-02 19:34:11 +0000
commitaba2dd37f7acd4795da967030cb64d8e9d3b791e (patch)
treedc1d1d1ecd92426d2709f50fb36077ba06065c12 /gdb/language.c
parent09a7aba80a6e7a4a6e6cce7f877bcecf7a146919 (diff)
downloadgdb-aba2dd37f7acd4795da967030cb64d8e9d3b791e.zip
gdb-aba2dd37f7acd4795da967030cb64d8e9d3b791e.tar.gz
gdb-aba2dd37f7acd4795da967030cb64d8e9d3b791e.tar.bz2
* language.h (struct language_defn): Remove la_builtin_type_vector
and string_char_type members. * language.c (language_string_char_type): No longer consult la->string_char_type. (language_lookup_primitive_type_by_name): No longer consult current_language->la_builtin_type_vector. * language.c (unknown_language_defn, auto_language_defn, local_language_defn): Adapt initializer. * ada-lang.c (ada_language_defn): Likewise. * c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn, minimal_language_defn): Likewise. * f-lang.c (f_language_defn): Likewise. * jv-lang.c (java_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise. * scm-lang.c (scm_language_defn): Likewise.
Diffstat (limited to 'gdb/language.c')
-rw-r--r--gdb/language.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/gdb/language.c b/gdb/language.c
index d5c6a94..fe2939e 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -1179,7 +1179,6 @@ const struct language_defn unknown_language_defn =
{
"unknown",
language_unknown,
- NULL,
range_check_off,
type_check_off,
array_row_major,
@@ -1204,7 +1203,6 @@ const struct language_defn unknown_language_defn =
unk_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- NULL,
default_word_break_characters,
unknown_language_arch_info, /* la_language_arch_info. */
default_print_array_index,
@@ -1217,7 +1215,6 @@ const struct language_defn auto_language_defn =
{
"auto",
language_auto,
- NULL,
range_check_off,
type_check_off,
array_row_major,
@@ -1242,7 +1239,6 @@ const struct language_defn auto_language_defn =
unk_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- NULL,
default_word_break_characters,
unknown_language_arch_info, /* la_language_arch_info. */
default_print_array_index,
@@ -1254,7 +1250,6 @@ const struct language_defn local_language_defn =
{
"local",
language_auto,
- NULL,
range_check_off,
type_check_off,
case_sensitive_on,
@@ -1279,7 +1274,6 @@ const struct language_defn local_language_defn =
unk_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
- NULL,
default_word_break_characters,
unknown_language_arch_info, /* la_language_arch_info. */
default_print_array_index,
@@ -1321,10 +1315,7 @@ language_string_char_type (const struct language_defn *la,
{
struct language_gdbarch *ld = gdbarch_data (gdbarch,
language_gdbarch_data);
- if (ld->arch_info[la->la_language].string_char_type != NULL)
- return ld->arch_info[la->la_language].string_char_type;
- else
- return (*la->string_char_type);
+ return ld->arch_info[la->la_language].string_char_type;
}
struct type *
@@ -1334,25 +1325,13 @@ language_lookup_primitive_type_by_name (const struct language_defn *la,
{
struct language_gdbarch *ld = gdbarch_data (gdbarch,
language_gdbarch_data);
- if (ld->arch_info[la->la_language].primitive_type_vector != NULL)
- {
- struct type *const *p;
- for (p = ld->arch_info[la->la_language].primitive_type_vector;
- (*p) != NULL;
- p++)
- {
- if (strcmp (TYPE_NAME (*p), name) == 0)
- return (*p);
- }
- }
- else
+ struct type *const *p;
+ for (p = ld->arch_info[la->la_language].primitive_type_vector;
+ (*p) != NULL;
+ p++)
{
- struct type **const *p;
- for (p = current_language->la_builtin_type_vector; *p != NULL; p++)
- {
- if (strcmp (TYPE_NAME (**p), name) == 0)
- return (**p);
- }
+ if (strcmp (TYPE_NAME (*p), name) == 0)
+ return (*p);
}
return (NULL);
}