* language.h (struct language_defn): Remove la_builtin_type_vector
authorUlrich Weigand <uweigand@de.ibm.com>
Fri, 2 Nov 2007 19:34:11 +0000 (19:34 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Fri, 2 Nov 2007 19:34:11 +0000 (19:34 +0000)
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.

gdb/ChangeLog
gdb/ada-lang.c
gdb/c-lang.c
gdb/f-lang.c
gdb/jv-lang.c
gdb/language.c
gdb/language.h
gdb/m2-lang.c
gdb/objc-lang.c
gdb/p-lang.c
gdb/scm-lang.c

index abf17fee072726ee6047e74a39453d25492fc9b1..8270427347f319bd61713114ad6abcb547413b4d 100644 (file)
@@ -1,3 +1,24 @@
+2007-11-02  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * 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.
+
 2007-11-02  Markus Deuling  <deuling@de.ibm.com>
 
        * frame.c (frame_id_inner): Add gdbarch parameter. Replace
index 53f32f27ca71b4a09859b9163c19d271af7f059b..e7852c5b10ea5a42cdf0c17228760f13c1047413 100644 (file)
@@ -10411,7 +10411,6 @@ static const struct exp_descriptor ada_exp_descriptor = {
 const struct language_defn ada_language_defn = {
   "ada",                        /* Language name */
   language_ada,
-  NULL,
   range_check_off,
   type_check_off,
   case_sensitive_on,            /* Yes, Ada is case-insensitive, but
@@ -10437,7 +10436,6 @@ const struct language_defn ada_language_defn = {
   ada_op_print_tab,             /* expression operators for printing */
   0,                            /* c-style arrays */
   1,                            /* String lower bound */
-  NULL,
   ada_get_gdb_completer_word_break_characters,
   ada_language_arch_info,
   ada_print_array_index,
index 9b4d1cd086896b61e9bbc6779937f671f7859f41..cc952a8c79a32808faaf57a3ddeb53e8c49f19e3 100644 (file)
@@ -592,7 +592,6 @@ const struct language_defn c_language_defn =
 {
   "c",                         /* Language name */
   language_c,
-  NULL,
   range_check_off,
   type_check_off,
   case_sensitive_on,
@@ -617,7 +616,6 @@ const struct language_defn c_language_defn =
   c_op_print_tab,              /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
-  NULL,
   default_word_break_characters,
   c_language_arch_info,
   default_print_array_index,
@@ -698,7 +696,6 @@ const struct language_defn cplus_language_defn =
 {
   "c++",                       /* Language name */
   language_cplus,
-  NULL,
   range_check_off,
   type_check_off,
   case_sensitive_on,
@@ -723,7 +720,6 @@ const struct language_defn cplus_language_defn =
   c_op_print_tab,              /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
-  NULL,
   default_word_break_characters,
   cplus_language_arch_info,
   default_print_array_index,
@@ -735,7 +731,6 @@ const struct language_defn asm_language_defn =
 {
   "asm",                       /* Language name */
   language_asm,
-  NULL,
   range_check_off,
   type_check_off,
   case_sensitive_on,
@@ -760,7 +755,6 @@ const struct language_defn asm_language_defn =
   c_op_print_tab,              /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
-  NULL,
   default_word_break_characters,
   c_language_arch_info, /* FIXME: la_language_arch_info.  */
   default_print_array_index,
@@ -777,7 +771,6 @@ const struct language_defn minimal_language_defn =
 {
   "minimal",                   /* Language name */
   language_minimal,
-  NULL,
   range_check_off,
   type_check_off,
   case_sensitive_on,
@@ -802,7 +795,6 @@ const struct language_defn minimal_language_defn =
   c_op_print_tab,              /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
-  NULL,
   default_word_break_characters,
   c_language_arch_info,
   default_print_array_index,
index ad6835eba40bad160ac6006b5cfb957c34a37e86..25fde404d6a19611ea0b5d36f137e3c301a89d5a 100644 (file)
@@ -474,7 +474,6 @@ const struct language_defn f_language_defn =
 {
   "fortran",
   language_fortran,
-  NULL,
   range_check_on,
   type_check_on,
   case_sensitive_off,
@@ -499,7 +498,6 @@ 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 */
-  NULL,
   default_word_break_characters,
   f_language_arch_info,
   default_print_array_index,
index d28df029c0191f68a415eaa2e908fb2f3e25617c..a426d6175f39e1f192250618ebe3270acdf416c9 100644 (file)
@@ -1086,7 +1086,6 @@ const struct language_defn java_language_defn =
 {
   "java",                      /* Language name */
   language_java,
-  NULL,
   range_check_off,
   type_check_off,
   case_sensitive_on,
@@ -1111,7 +1110,6 @@ const struct language_defn java_language_defn =
   java_op_print_tab,           /* expression operators for printing */
   0,                           /* not c-style arrays */
   0,                           /* String lower bound */
-  NULL,
   default_word_break_characters,
   c_language_arch_info,
   default_print_array_index,
index d5c6a94b095fc0c22d9c9c19bbc9d2412d95d642..fe2939e31f32439df11e91e00e184dbd0992d54a 100644 (file)
@@ -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);
 }
index 3649b00d039d4b1a7631b85abfa28a4f75f15e0a..798c4d0592b03da4110833c8de3c39c5315da9e8 100644 (file)
@@ -148,13 +148,6 @@ struct language_defn
 
     enum language la_language;
 
-    /* Its builtin types.  This is a vector ended by a NULL pointer.  These
-       types can be specified by name in parsing types in expressions,
-       regardless of whether the program being debugged actually defines
-       such a type.  */
-
-    struct type **const *la_builtin_type_vector;
-
     /* Default range checking */
 
     enum range_check la_range_check;
@@ -264,9 +257,6 @@ struct language_defn
     /* Index to use for extracting the first element of a string. */
     char string_lower_bound;
 
-    /* Type of elements of strings. */
-    struct type **string_char_type;
-
     /* The list of characters forming word boundaries.  */
     char *(*la_word_break_characters) (void);
 
index be7eaed12856292cbefea64d838d94d390c22028..bac36324408df05a42aca94e782eaf009907ab8f 100644 (file)
@@ -529,7 +529,6 @@ const struct language_defn m2_language_defn =
 {
   "modula-2",
   language_m2,
-  NULL,
   range_check_on,
   type_check_on,
   case_sensitive_on,
@@ -554,7 +553,6 @@ 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 */
-  NULL,
   default_word_break_characters,
   m2_language_arch_info,
   default_print_array_index,
index d1771d92e8b9407db49f2bb65f3be5f353e43134..83bc4ef7ec98d1e67179328b23be3a48f24fabbf 100644 (file)
@@ -639,7 +639,6 @@ static const struct op_print objc_op_print_tab[] =
 const struct language_defn objc_language_defn = {
   "objective-c",               /* Language name */
   language_objc,
-  NULL,
   range_check_off,
   type_check_off,
   case_sensitive_on,
@@ -664,7 +663,6 @@ const struct language_defn objc_language_defn = {
   objc_op_print_tab,           /* Expression operators for printing */
   1,                           /* C-style arrays */
   0,                           /* String lower bound */
-  NULL,
   default_word_break_characters,
   c_language_arch_info,
   default_print_array_index,
index 4b187201bc96cda32da91091e46d7db1c237a58a..7697279c6b9f2c1a34ef94bb757154c4751040f4 100644 (file)
@@ -546,7 +546,6 @@ const struct language_defn pascal_language_defn =
 {
   "pascal",                    /* Language name */
   language_pascal,
-  NULL,
   range_check_on,
   type_check_on,
   case_sensitive_on,
@@ -571,7 +570,6 @@ const struct language_defn pascal_language_defn =
   pascal_op_print_tab,         /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
-  NULL,
   default_word_break_characters,
   pascal_language_arch_info,
   default_print_array_index,
index a8de4b039313442883427fe5b58c4f4963295c25..24dac04f2dc5840313272227e1ae0dc25c00b05e 100644 (file)
@@ -238,7 +238,6 @@ const struct language_defn scm_language_defn =
 {
   "scheme",                    /* Language name */
   language_scm,
-  NULL,
   range_check_off,
   type_check_off,
   case_sensitive_off,
@@ -263,7 +262,6 @@ const struct language_defn scm_language_defn =
   NULL,                                /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
-  NULL,
   default_word_break_characters,
   c_language_arch_info,
   default_print_array_index,