* ada-lang.c (ada_coerce_to_simple_array_type): Use builtin_type_int32
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:22:33 +0000 (14:22 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Thu, 11 Sep 2008 14:22:33 +0000 (14:22 +0000)
instead of builtin_type_int as default unspecified integral type.
(ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
assign_component, to_fixed_range_type): Likewise.
* ada-typeprint.c (print_range, print_range_bound,
print_range_type_named): Likewise.
* ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
* eval.c (evaluate_subexp_standard): Likewise.
* gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
* gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
build_gdb_vtable_type): Likewise.
* jv-lang.c (java_array_type): Likewise.
* m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
* m2-valprint.c (m2_print_long_set): Likewise.
* parse.c (follow_types): Likewise.
* p-typeprint.c (pascal_type_print_base): Likewise.
* valops.c (value_one, value_array, value_string,
value_bitstring): Likewise.
* value.c (allocate_repeat_value, value_from_string): Likewise.
* varobj.c (c_describe_child): Likewise.
* mt-tdep.c (mt_register_type): Likewise.
* sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
* sh64-tdep.c (sh64_build_float_register_type): Likewise.

18 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/ada-typeprint.c
gdb/ada-valprint.c
gdb/eval.c
gdb/gnu-v2-abi.c
gdb/gnu-v3-abi.c
gdb/jv-lang.c
gdb/m2-typeprint.c
gdb/m2-valprint.c
gdb/mt-tdep.c
gdb/p-typeprint.c
gdb/parse.c
gdb/sh-tdep.c
gdb/sh64-tdep.c
gdb/valops.c
gdb/value.c
gdb/varobj.c

index 61644638c13d73fa707859f027305000bfcac9ec..70b9ae94cd7c8b387ee3eab890dc9aa26424d9c2 100644 (file)
@@ -1,3 +1,29 @@
+2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * ada-lang.c (ada_coerce_to_simple_array_type): Use builtin_type_int32
+       instead of builtin_type_int as default unspecified integral type.
+       (ada_index_type, ada_array_bound_from_type, ada_variant_discrim_type,
+       assign_component, to_fixed_range_type): Likewise.
+       * ada-typeprint.c (print_range, print_range_bound,
+       print_range_type_named): Likewise.
+       * ada-valprint.c (print_optional_low_bound, ada_val_print_1): Likewise.
+       * eval.c (evaluate_subexp_standard): Likewise.
+       * gnu-v2-abi.c (gnuv2_virtual_fn_field): Likewise.
+       * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
+       build_gdb_vtable_type): Likewise.
+       * jv-lang.c (java_array_type): Likewise.
+       * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Likewise.
+       * m2-valprint.c (m2_print_long_set): Likewise.
+       * parse.c (follow_types): Likewise.
+       * p-typeprint.c (pascal_type_print_base): Likewise.
+       * valops.c (value_one, value_array, value_string,
+       value_bitstring): Likewise.
+       * value.c (allocate_repeat_value, value_from_string): Likewise.
+       * varobj.c (c_describe_child): Likewise.
+       * mt-tdep.c (mt_register_type): Likewise.
+       * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
+       * sh64-tdep.c (sh64_build_float_register_type): Likewise.
+
 2008-09-11  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * gdbtypes.h (struct builtin_type): Remove builtin_true_char
index 66f01ac048bbf3f9347fa6ed9502a3160d7a2283..844b25d9f421d8f77e3c0336c515147848bd0591 100644 (file)
@@ -1759,7 +1759,7 @@ struct type *
 ada_coerce_to_simple_array_type (struct type *type)
 {
   struct value *mark = value_mark ();
-  struct value *dummy = value_from_longest (builtin_type_long, 0);
+  struct value *dummy = value_from_longest (builtin_type_int32, 0);
   struct type *result;
   deprecated_set_value_type (dummy, type);
   result = ada_type_of_array (dummy, 0);
@@ -2500,7 +2500,7 @@ ada_index_type (struct type *type, int n)
          has a target type of TYPE_CODE_UNDEF.  We compensate here, but
          perhaps stabsread.c would make more sense.  */
       if (result_type == NULL || TYPE_CODE (result_type) == TYPE_CODE_UNDEF)
-        result_type = builtin_type_int;
+        result_type = builtin_type_int32;
 
       return result_type;
     }
@@ -2528,7 +2528,7 @@ ada_array_bound_from_type (struct type * arr_type, int n, int which,
   if (arr_type == NULL || !ada_is_simple_array_type (arr_type))
     {
       if (typep != NULL)
-        *typep = builtin_type_int;
+        *typep = builtin_type_int32;
       return (LONGEST) - which;
     }
 
@@ -5842,7 +5842,7 @@ ada_variant_discrim_type (struct type *var_type, struct type *outer_type)
   struct type *type =
     ada_lookup_struct_elt_type (outer_type, name, 1, 1, NULL);
   if (type == NULL)
-    return builtin_type_int;
+    return builtin_type_int32;
   else
     return type;
 }
@@ -8054,7 +8054,7 @@ assign_component (struct value *container, struct value *lhs, LONGEST index,
   struct value *elt;
   if (TYPE_CODE (value_type (lhs)) == TYPE_CODE_ARRAY)
     {
-      struct value *index_val = value_from_longest (builtin_type_int, index);
+      struct value *index_val = value_from_longest (builtin_type_int32, index);
       elt = unwrap_value (ada_value_subscript (lhs, 1, &index_val));
     }
   else
@@ -9504,7 +9504,7 @@ to_fixed_range_type (char *name, struct value *dval, struct objfile *objfile)
   char *subtype_info;
 
   if (raw_type == NULL)
-    base_type = builtin_type_int;
+    base_type = builtin_type_int32;
   else if (TYPE_CODE (raw_type) == TYPE_CODE_RANGE)
     base_type = TYPE_TARGET_TYPE (raw_type);
   else
index e46637f48b353379c933e68bceee0278b4201b03..cb4fecd3e17a192b2ffe3e1c79eaa59b0ede1ae2 100644 (file)
@@ -149,7 +149,7 @@ print_range (struct type *type, struct ui_file *stream)
     case TYPE_CODE_ENUM:
       break;
     default:
-      target_type = builtin_type_int;
+      target_type = builtin_type_int32;
       break;
     }
 
@@ -197,11 +197,11 @@ print_range_bound (struct type *type, char *bounds, int *n,
          the upper bound of the 0 .. -1 range types to be printed as
          a very large unsigned number instead of -1.
          To workaround this stabs deficiency, we replace the TYPE by
-         builtin_type_long when we detect that the bound is negative,
+         builtin_type_int32 when we detect that the bound is negative,
          and the type is a TYPE_CODE_INT.  The bound is negative when
          'm' is the last character of the number scanned in BOUNDS.  */
       if (bounds[*n - 1] == 'm' && TYPE_CODE (type) == TYPE_CODE_INT)
-       type = builtin_type_long;
+       type = builtin_type_int32;
       ada_print_scalar (type, B, stream);
       if (bounds[*n] == '_')
        *n += 2;
@@ -258,7 +258,7 @@ print_range_type_named (char *name, struct ui_file *stream)
   char *subtype_info;
 
   if (raw_type == NULL)
-    base_type = builtin_type_int;
+    base_type = builtin_type_int32;
   else if (TYPE_CODE (raw_type) == TYPE_CODE_RANGE)
     base_type = TYPE_TARGET_TYPE (raw_type);
   else
index 5d8d73d56de3463262133ce329351e3f38a4a4cf..e2f7740e2891188c524ef6be9f2f4502fb05ca06 100644 (file)
@@ -122,7 +122,7 @@ print_optional_low_bound (struct ui_file *stream, struct type *type)
        return 0;
       break;
     case TYPE_CODE_UNDEF:
-      index_type = builtin_type_long;
+      index_type = builtin_type_int32;
       /* FALL THROUGH */
     default:
       if (low_bound == 1)
@@ -753,7 +753,7 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr0,
                  make_pointer_type
                  (create_array_type
                   (NULL, builtin_type_true_char,
-                   create_range_type (NULL, builtin_type_int, 0, 32)), NULL);
+                   create_range_type (NULL, builtin_type_int32, 0, 32)), NULL);
 
              printable_val =
                value_ind (value_cast (parray_of_char,
index 0cccc82866276857a1e34418a0ab255e0d51c44c..66259b9f95df1f3ca9bcf126479daf9d6f613cab 100644 (file)
@@ -2028,7 +2028,7 @@ evaluate_subexp_standard (struct type *expect_type,
 
        /* Construct a value node with the value of the offset */
 
-       arg2 = value_from_longest (builtin_type_f_integer, offset_item);
+       arg2 = value_from_longest (builtin_type_int32, offset_item);
 
        /* Let us now play a dirty trick: we will take arg1 
           which is a value node pointing to the topmost level
index 771cc2b709ffd78b2c3c6ee107b274793a39ecb9..2405fb04eb827e1e994a210da1937a518e763d25 100644 (file)
@@ -97,7 +97,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
   struct value *entry;
   struct value *vfn;
   struct value *vtbl;
-  struct value *vi = value_from_longest (builtin_type_int,
+  struct value *vi = value_from_longest (builtin_type_int32,
                                     (LONGEST) TYPE_FN_FIELD_VOFFSET (f, j));
   struct type *fcontext = TYPE_FN_FIELD_FCONTEXT (f, j);
   struct type *context;
index 90497ca0b0b42f87199638932673fb89da861a28..1ae6d9a079e15d737de65e883cd08f04064e2f57 100644 (file)
@@ -132,7 +132,7 @@ build_gdb_vtable_type (struct gdbarch *arch)
   FIELD_NAME (*field) = "vcall_and_vbase_offsets";
   FIELD_TYPE (*field)
     = create_array_type (0, ptrdiff_type,
-                         create_range_type (0, builtin_type_int, 0, -1));
+                         create_range_type (0, builtin_type_int32, 0, -1));
   FIELD_BITPOS (*field) = offset * TARGET_CHAR_BIT;
   offset += TYPE_LENGTH (FIELD_TYPE (*field));
   field++;
@@ -155,7 +155,7 @@ build_gdb_vtable_type (struct gdbarch *arch)
   FIELD_NAME (*field) = "virtual_functions";
   FIELD_TYPE (*field)
     = create_array_type (0, ptr_to_void_fn_type,
-                         create_range_type (0, builtin_type_int, 0, -1));
+                         create_range_type (0, builtin_type_int32, 0, -1));
   FIELD_BITPOS (*field) = offset * TARGET_CHAR_BIT;
   offset += TYPE_LENGTH (FIELD_TYPE (*field));
   field++;
@@ -326,7 +326,7 @@ gnuv3_get_virtual_fn (struct value *container, struct type *fntype,
 
   /* Fetch the appropriate function pointer from the vtable.  */
   vfn = value_subscript (value_field (vtable, vtable_field_virtual_functions),
-                         value_from_longest (builtin_type_int, vtable_index));
+                         value_from_longest (builtin_type_int32, vtable_index));
 
   /* If this architecture uses function descriptors directly in the vtable,
      then the address of the vtable entry is actually a "function pointer"
@@ -429,7 +429,7 @@ gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr,
                                                    address));
   vtable = value_at_lazy (vtable_type,
                           vtable_address - vtable_address_point_offset ());
-  offset_val = value_from_longest(builtin_type_int, cur_base_offset);
+  offset_val = value_from_longest(builtin_type_int32, cur_base_offset);
   vbase_array = value_field (vtable, vtable_field_vcall_and_vbase_offsets);
   base_offset = value_as_long (value_subscript (vbase_array, offset_val));
   return base_offset;
index 4430633240e8f8646edb745a5b5a08b26a8272a2..39d8f4821e014f94387b43c67fe4e297c4d84ba0 100644 (file)
@@ -775,7 +775,7 @@ java_array_type (struct type *type, int dims)
 
   while (dims-- > 0)
     {
-      range_type = create_range_type (NULL, builtin_type_int, 0, 0);
+      range_type = create_range_type (NULL, builtin_type_int32, 0, 0);
       /* FIXME  This is bogus!  Java arrays are not gdb arrays! */
       type = create_array_type (NULL, type, range_type);
     }
index 335f8c3c41f2292e4a8ea5054ad22a9ed34f497b..666ae286677ba649dff850741b2bb2f3d9076f62 100644 (file)
@@ -287,7 +287,7 @@ m2_print_bounds (struct type *type,
   struct type *target = TYPE_TARGET_TYPE (type);
 
   if (target == NULL)
-    target = builtin_type_int;
+    target = builtin_type_int32;
 
   if (TYPE_NFIELDS(type) == 0)
     return;
@@ -394,7 +394,7 @@ m2_is_long_set_of_type (struct type *type, struct type **of_type)
       range = TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i));
       target = TYPE_TARGET_TYPE (range);
       if (target == NULL)
-       target = builtin_type_int;
+       target = builtin_type_int32;
 
       l1 = TYPE_LOW_BOUND (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i)));
       h1 = TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, len-1)));
index e09ec2153ffa0c7bacb3d4cc0ebcbf073bd74279..82ff30e0b7681e5729af686088a799eed0fce2cf 100644 (file)
@@ -119,7 +119,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr,
 
   target = TYPE_TARGET_TYPE (range);
   if (target == NULL)
-    target = builtin_type_int;
+    target = builtin_type_int32;
 
   if (get_discrete_bounds (range, &field_low, &field_high) >= 0)
     {
@@ -165,7 +165,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr,
                break;
              target = TYPE_TARGET_TYPE (range);
              if (target == NULL)
-               target = builtin_type_int;
+               target = builtin_type_int32;
            }
        }
       if (element_seen)
index 0a78f0fe1609f7926824db03420aa5e64165fae4..fd3f5882d405bbb8892b9a7de74f6b8c1ee0f126 100644 (file)
@@ -258,7 +258,7 @@ mt_register_type (struct gdbarch *arch, int regnum)
       if (copro_type == NULL)
        {
          struct type *temp;
-         temp = create_range_type (NULL, builtin_type_unsigned_int, 0, 1);
+         temp = create_range_type (NULL, builtin_type_int32, 0, 1);
          copro_type = create_array_type (NULL, builtin_type_int16, temp);
        }
       switch (regnum)
index e2c34e5e9c710b60ce42fee61a84322aede24280..a10982d773bbdaa6e67542d738a1bb8ab47b7ed4 100644 (file)
@@ -756,7 +756,7 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
       {
        struct type *target = TYPE_TARGET_TYPE (type);
        if (target == NULL)
-         target = builtin_type_long;
+         target = builtin_type_int32;
        print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
        fputs_filtered ("..", stream);
        print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
index 2a6b8cb25d8e67b38980ca6c0a276a905d84b60d..75853ff2e238803f034bf06fb7b0c6daf8b6933b 100644 (file)
@@ -1262,7 +1262,7 @@ follow_types (struct type *follow_type)
           done with it.  */
        range_type =
          create_range_type ((struct type *) NULL,
-                            builtin_type_int, 0,
+                            builtin_type_int32, 0,
                             array_size >= 0 ? array_size - 1 : 0);
        follow_type =
          create_array_type ((struct type *) NULL,
index 0c841d6f613cd30df2d4fc896ea5024d94d032a9..20ba95ec08d35780fd5834210d9d63097ca3c860 100644 (file)
@@ -2148,7 +2148,7 @@ sh_sh4_build_float_register_type (int high)
 {
   struct type *temp;
 
-  temp = create_range_type (NULL, builtin_type_int, 0, high);
+  temp = create_range_type (NULL, builtin_type_int32, 0, high);
   return create_array_type (NULL, builtin_type_float, temp);
 }
 
index d8ab9399149ece7ebcb9599fc1bde968c486f60b..e127995cbdf6a92a036d12a4d8cb60ee9cee3035 100644 (file)
@@ -1499,7 +1499,7 @@ sh64_build_float_register_type (int high)
 {
   struct type *temp;
 
-  temp = create_range_type (NULL, builtin_type_int, 0, high);
+  temp = create_range_type (NULL, builtin_type_int32, 0, high);
   return create_array_type (NULL, builtin_type_float, temp);
 }
 
index f14c2f5f38d4ceeb3811b417a180ee2c7b9a784e..48c244563054f06c0575649a4cfadaefcd6f4bf5 100644 (file)
@@ -529,11 +529,11 @@ value_one (struct type *type, enum lval_type lv)
 
   if (TYPE_CODE (type1) == TYPE_CODE_DECFLOAT)
     {
-      struct value *int_one = value_from_longest (builtin_type_int, 1);
+      struct value *int_one = value_from_longest (builtin_type_int32, 1);
       struct value *val;
       gdb_byte v[16];
 
-      decimal_from_integral (int_one, v, TYPE_LENGTH (builtin_type_int));
+      decimal_from_integral (int_one, v, TYPE_LENGTH (builtin_type_int32));
       val = value_from_decfloat (type, v);
     }
   else if (TYPE_CODE (type1) == TYPE_CODE_FLT)
@@ -1247,7 +1247,7 @@ value_array (int lowbound, int highbound, struct value **elemvec)
     }
 
   rangetype = create_range_type ((struct type *) NULL, 
-                                builtin_type_int,
+                                builtin_type_int32,
                                 lowbound, highbound);
   arraytype = create_array_type ((struct type *) NULL,
                                 value_enclosing_type (elemvec[0]), 
@@ -1291,7 +1291,7 @@ value_string (char *ptr, int len)
   struct value *val;
   int lowbound = current_language->string_lower_bound;
   struct type *rangetype = create_range_type ((struct type *) NULL,
-                                             builtin_type_int,
+                                             builtin_type_int32,
                                              lowbound, 
                                              len + lowbound - 1);
   struct type *stringtype
@@ -1321,7 +1321,7 @@ value_bitstring (char *ptr, int len)
 {
   struct value *val;
   struct type *domain_type = create_range_type (NULL, 
-                                               builtin_type_int,
+                                               builtin_type_int32,
                                                0, len - 1);
   struct type *type = create_set_type ((struct type *) NULL, 
                                       domain_type);
index c0e6c99b36736340fc6e556acddd1e009e6cb1b8..f3f2c72dab634b3f034be09e059eba77586a82f1 100644 (file)
@@ -249,7 +249,7 @@ allocate_repeat_value (struct type *type, int count)
   /* FIXME-type-allocation: need a way to free this type when we are
      done with it.  */
   struct type *range_type
-  = create_range_type ((struct type *) NULL, builtin_type_int,
+  = create_range_type ((struct type *) NULL, builtin_type_int32,
                       low_bound, count + low_bound - 1);
   /* FIXME-type-allocation: need a way to free this type when we are
      done with it.  */
@@ -1638,7 +1638,7 @@ value_from_string (char *ptr)
   struct type *stringtype;
 
   rangetype = create_range_type ((struct type *) NULL,
-                                builtin_type_int,
+                                builtin_type_int32,
                                 lowbound, len + lowbound - 1);
   string_char_type = language_string_char_type (current_language,
                                                current_gdbarch);
index 3a0bf5e373dfbc06d7c64d2f6fa072f255cbc280..35d876ff09229241944ccf291cb9882966113fa0 100644 (file)
@@ -2072,7 +2072,7 @@ c_describe_child (struct varobj *parent, int index,
        {
          int real_index = index + TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type));
          struct value *indval = 
-           value_from_longest (builtin_type_int, (LONGEST) real_index);
+           value_from_longest (builtin_type_int32, (LONGEST) real_index);
          gdb_value_subscript (value, indval, cvalue);
        }
 
This page took 0.042265 seconds and 4 git commands to generate.