aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-02 14:27:27 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-02 14:27:27 +0000
commit1b831c9308be215e465dac7079ba18aca8d2e68f (patch)
treed896e11a6a95d13abb3e459abe93971d51ed804f /gdb/valops.c
parent97bf5e38c3229ad1965e2839055a7c6baf6a3506 (diff)
downloadgdb-1b831c9308be215e465dac7079ba18aca8d2e68f.zip
gdb-1b831c9308be215e465dac7079ba18aca8d2e68f.tar.gz
gdb-1b831c9308be215e465dac7079ba18aca8d2e68f.tar.bz2
2003-01-02 Andrew Cagney <ac131313@redhat.com>
* valarith.c (value_binop): Delete obsolete code and comments. * configure.host: Ditto. * buildsym.h (make_blockvector): Ditto. * buildsym.c (make_blockvector): Ditto. * defs.h (enum language): Ditto. (chill_demangle): Ditto. * elfread.c (elf_symtab_read): Ditto. * dwarfread.c (CHILL_PRODUCER): Ditto. (set_cu_language): Ditto. (handle_producer): Ditto. * expprint.c (print_subexp): Ditto. * gdbtypes.c (chill_varying_type): Ditto. * gdbtypes.h (builtin_type_chill_bool): Ditto. (builtin_type_chill_char, builtin_type_chill_long): Ditto. (builtin_type_chill_ulong, builtin_type_chill_real): Ditto. (chill_varying_type): Ditto. * language.h (_LANG_chill): Ditto. * language.c (binop_result_type, integral_type): Ditto. (character_type, string_type, structured_type): Ditto. (lang_bool_type, binop_type_check): Ditto. * stabsread.h (os9k_stabs): Ditto. * stabsread.c (os9k_type_vector, dbx_lookup_type): Ditto. (define_symbol, read_type, read_struct_fields): Ditto. (read_array_type, read_enum_type, read_huge_number): Ditto. (read_range_type, start_stabs): Ditto. * symfile.c (init_filename_language_table): Ditto. (add_psymbol_with_dem_name_to_list): Ditto. * symtab.c (symbol_init_language_specific): Ditto. (symbol_init_demangled_name, symbol_demangled_name): Ditto. * symtab.h (struct general_symbol_info): Ditto. (SYMBOL_CHILL_DEMANGLED_NAME): Ditto. * typeprint.c (typedef_print): Ditto. * utils.c (fprintf_symbol_filtered): Ditto. * valops.c (value_cast, search_struct_field, value_slice): Delete obsolete code. (varying_to_slice): Delete function. * value.h (COERCE_VARYING_ARRAY): Delete obsolete macro contents. (varying_to_slice): Delete declaration. * MAINTAINERS: Update.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c80
1 files changed, 11 insertions, 69 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index b7d50e5..db778af 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -376,49 +376,6 @@ value_cast (struct type *type, struct value *arg2)
VALUE_POINTED_TO_OFFSET (arg2) = 0; /* pai: chk_val */
return arg2;
}
- /* OBSOLETE else if (chill_varying_type (type)) */
- /* OBSOLETE { */
- /* OBSOLETE struct type *range1, *range2, *eltype1, *eltype2; */
- /* OBSOLETE struct value *val; */
- /* OBSOLETE int count1, count2; */
- /* OBSOLETE LONGEST low_bound, high_bound; */
- /* OBSOLETE char *valaddr, *valaddr_data; */
- /* OBSOLETE *//* For lint warning about eltype2 possibly uninitialized: */
- /* OBSOLETE eltype2 = NULL; */
- /* OBSOLETE if (code2 == TYPE_CODE_BITSTRING) */
- /* OBSOLETE error ("not implemented: converting bitstring to varying type"); */
- /* OBSOLETE if ((code2 != TYPE_CODE_ARRAY && code2 != TYPE_CODE_STRING) */
- /* OBSOLETE || (eltype1 = check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 1))), */
- /* OBSOLETE eltype2 = check_typedef (TYPE_TARGET_TYPE (type2)), */
- /* OBSOLETE (TYPE_LENGTH (eltype1) != TYPE_LENGTH (eltype2) */
- /* OBSOLETE *//*|| TYPE_CODE (eltype1) != TYPE_CODE (eltype2) *//* ))) */
- /* OBSOLETE error ("Invalid conversion to varying type"); */
- /* OBSOLETE range1 = TYPE_FIELD_TYPE (TYPE_FIELD_TYPE (type, 1), 0); */
- /* OBSOLETE range2 = TYPE_FIELD_TYPE (type2, 0); */
- /* OBSOLETE if (get_discrete_bounds (range1, &low_bound, &high_bound) < 0) */
- /* OBSOLETE count1 = -1; */
- /* OBSOLETE else */
- /* OBSOLETE count1 = high_bound - low_bound + 1; */
- /* OBSOLETE if (get_discrete_bounds (range2, &low_bound, &high_bound) < 0) */
- /* OBSOLETE count1 = -1, count2 = 0; *//* To force error before */
- /* OBSOLETE else */
- /* OBSOLETE count2 = high_bound - low_bound + 1; */
- /* OBSOLETE if (count2 > count1) */
- /* OBSOLETE error ("target varying type is too small"); */
- /* OBSOLETE val = allocate_value (type); */
- /* OBSOLETE valaddr = VALUE_CONTENTS_RAW (val); */
- /* OBSOLETE valaddr_data = valaddr + TYPE_FIELD_BITPOS (type, 1) / 8; */
- /* OBSOLETE *//* Set val's __var_length field to count2. */
- /* OBSOLETE store_signed_integer (valaddr, TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)), */
- /* OBSOLETE count2); */
- /* OBSOLETE *//* Set the __var_data field to count2 elements copied from arg2. */
- /* OBSOLETE memcpy (valaddr_data, VALUE_CONTENTS (arg2), */
- /* OBSOLETE count2 * TYPE_LENGTH (eltype2)); */
- /* OBSOLETE *//* Zero the rest of the __var_data field of val. */
- /* OBSOLETE memset (valaddr_data + count2 * TYPE_LENGTH (eltype2), '\0', */
- /* OBSOLETE (count1 - count2) * TYPE_LENGTH (eltype2)); */
- /* OBSOLETE return val; */
- /* OBSOLETE } */
else if (VALUE_LVAL (arg2) == lval_memory)
{
return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2),
@@ -2163,22 +2120,23 @@ search_struct_field (char *name, struct value *arg1, int offset,
/* Look for a match through the fields of an anonymous union,
or anonymous struct. C++ provides anonymous unions.
- In the GNU Chill (OBSOLETE) implementation of
- variant record types, each <alternative field> has
- an (anonymous) union type, each member of the union
- represents a <variant alternative>. Each <variant
- alternative> is represented as a struct, with a
- member for each <variant field>. */
+ In the GNU Chill (now deleted from GDB)
+ implementation of variant record types, each
+ <alternative field> has an (anonymous) union type,
+ each member of the union represents a <variant
+ alternative>. Each <variant alternative> is
+ represented as a struct, with a member for each
+ <variant field>. */
struct value *v;
int new_offset = offset;
/* This is pretty gross. In G++, the offset in an
anonymous union is relative to the beginning of the
- enclosing struct. In the GNU Chill (OBSOLETE)
- implementation of variant records, the bitpos is
- zero in an anonymous union field, so we have to add
- the offset of the union here. */
+ enclosing struct. In the GNU Chill (now deleted
+ from GDB) implementation of variant records, the
+ bitpos is zero in an anonymous union field, so we
+ have to add the offset of the union here. */
if (TYPE_CODE (field_type) == TYPE_CODE_STRUCT
|| (TYPE_NFIELDS (field_type) > 0
&& TYPE_FIELD_BITPOS (field_type, 0) == 0))
@@ -3406,9 +3364,6 @@ value_slice (struct value *array, int lowbound, int length)
error ("slice from bad array or bitstring");
if (lowbound < lowerbound || length < 0
|| lowbound + length - 1 > upperbound)
- /* OBSOLETE Chill allows zero-length strings but not arrays. */
- /* OBSOLETE || (current_language->la_language == language_chill */
- /* OBSOLETE && length == 0 && TYPE_CODE (array_type) == TYPE_CODE_ARRAY)) */
error ("slice out of range");
/* FIXME-type-allocation: need a way to free this type when we are
done with it. */
@@ -3464,19 +3419,6 @@ value_slice (struct value *array, int lowbound, int length)
return slice;
}
-/* Assuming OBSOLETE chill_varying_type (VARRAY) is true, return an
- equivalent value as a fixed-length array. */
-
-struct value *
-varying_to_slice (struct value *varray)
-{
- struct type *vtype = check_typedef (VALUE_TYPE (varray));
- LONGEST length = unpack_long (TYPE_FIELD_TYPE (vtype, 0),
- VALUE_CONTENTS (varray)
- + TYPE_FIELD_BITPOS (vtype, 0) / 8);
- return value_slice (value_primitive_field (varray, 0, 1, vtype), 0, length);
-}
-
/* Create a value for a FORTRAN complex number. Currently most of
the time values are coerced to COMPLEX*16 (i.e. a complex number
composed of 2 doubles. This really should be a smarter routine