* jv-lang.c (enum java_primitive_types): New type.
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:11:02 +0000 (14:11 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:11:02 +0000 (14:11 +0000)
(java_language_arch_info): New function.
(java_language): Use it instead of c_language_arch_info.

gdb/ChangeLog
gdb/jv-lang.c

index 734b65dded3998ea76fff886673b5b848648baf8..0ba2e95afd525d6d7c1b4b81c69223b5ee35c833 100644 (file)
@@ -1,3 +1,9 @@
+2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * jv-lang.c (enum java_primitive_types): New type.
+       (java_language_arch_info): New function.
+       (java_language): Use it instead of c_language_arch_info.
+
 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * value.h (value_bitstring_subscript): New prototype.
index ecce2370c3515fede4f3a8e627402c1b40ea14a8..342829218c3214c371a77300ccffd29634eca49b 100644 (file)
@@ -1040,6 +1040,48 @@ const struct op_print java_op_print_tab[] =
   {NULL, 0, 0, 0}
 };
 
+enum java_primitive_types
+{
+  java_primitive_type_int,
+  java_primitive_type_short,
+  java_primitive_type_long,
+  java_primitive_type_byte,
+  java_primitive_type_boolean,
+  java_primitive_type_char,
+  java_primitive_type_float,
+  java_primitive_type_double,
+  java_primitive_type_void,
+  nr_java_primitive_types
+};
+
+void
+java_language_arch_info (struct gdbarch *gdbarch,
+                        struct language_arch_info *lai)
+{
+  lai->string_char_type = java_char_type;
+  lai->primitive_type_vector
+    = GDBARCH_OBSTACK_CALLOC (gdbarch, nr_java_primitive_types + 1,
+                              struct type *);
+  lai->primitive_type_vector [java_primitive_type_int]
+    = java_int_type;
+  lai->primitive_type_vector [java_primitive_type_short]
+    = java_short_type;
+  lai->primitive_type_vector [java_primitive_type_long]
+    = java_long_type;
+  lai->primitive_type_vector [java_primitive_type_byte]
+    = java_byte_type;
+  lai->primitive_type_vector [java_primitive_type_boolean]
+    = java_boolean_type;
+  lai->primitive_type_vector [java_primitive_type_char]
+    = java_char_type;
+  lai->primitive_type_vector [java_primitive_type_float]
+    = java_float_type;
+  lai->primitive_type_vector [java_primitive_type_double]
+    = java_double_type;
+  lai->primitive_type_vector [java_primitive_type_void]
+    = java_void_type;
+}
+
 const struct exp_descriptor exp_descriptor_java = 
 {
   print_subexp_standard,
@@ -1078,7 +1120,7 @@ const struct language_defn java_language_defn =
   0,                           /* String lower bound */
   default_word_break_characters,
   default_make_symbol_completion_list,
-  c_language_arch_info,
+  java_language_arch_info,
   default_print_array_index,
   default_pass_by_reference,
   LANG_MAGIC