diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-11-09 14:43:27 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-11-09 14:43:27 +0000 |
commit | 00a4c844d2c851177adf911848689e99db9a2cdb (patch) | |
tree | d89ce410c9918e83cb853d27c5a443a39a10f46e /gdb/valops.c | |
parent | 5cb2fe259cab194fd68b4d1e6736f7054b15790c (diff) | |
download | gdb-00a4c844d2c851177adf911848689e99db9a2cdb.zip gdb-00a4c844d2c851177adf911848689e99db9a2cdb.tar.gz gdb-00a4c844d2c851177adf911848689e99db9a2cdb.tar.bz2 |
2004-11-09 Andrew Cagney <cagney@gnu.org>
* value.h (struct value): Delete field bfd_section.
(VALUE_BFD_SECTION): Delete macro.
(COERCE_REF): Update.
(value_at, value_at_lazy): Delete asection parameter.
* printcmd.c (print_formatted, x_command): Update.
(do_examine): Delete asection parameter.
(next_section): Delete variable.
* valops.c (value_cast, value_at, value_at_lazy)
(value_coerce_function, value_addr, value_ind, value_string)
(find_rt_vbase_offset, value_full_object): Update.
* hpacc-abi.c (hpacc_virtual_fn_field)
(hpacc_value_rtti_type): Update.
* gnu-v3-abi.c (gnuv3_rtti_type, gnuv3_virtual_fn_field)
(gnuv3_baseclass_offset): Update.
* f-valprint.c (f_val_print): Update.
* c-valprint.c (c_val_print): Update.
* p-valprint.c (pascal_val_print): Update.
* jv-valprint.c (java_value_print): Update.
* jv-lang.c (java_class_from_object, evaluate_subexp_java): Update.
* ada-lang.c (ada_value_primitive_packed_val)
(ada_evaluate_subexp): Update.
* dwarf2loc.c (dwarf2_evaluate_loc_desc): Update.
* expprint.c (print_subexp_standard): Update.
* infcall.c (call_function_by_hand): Update.
* valarith.c (value_add): Update.
* eval.c (evaluate_subexp_standard): Update.
* values.c (allocate_value, value_copy, value_static_field): Update.
* findvar.c (read_var_value, locate_var_value): Update.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index de92457..18be57e 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -410,10 +410,7 @@ value_cast (struct type *type, struct value *arg2) return arg2; } else if (VALUE_LVAL (arg2) == lval_memory) - { - return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2), - VALUE_BFD_SECTION (arg2)); - } + return value_at_lazy (type, VALUE_ADDRESS (arg2) + VALUE_OFFSET (arg2)); else if (code1 == TYPE_CODE_VOID) { return value_zero (builtin_type_void, not_lval); @@ -451,7 +448,7 @@ value_zero (struct type *type, enum lval_type lv) adjustments before or after calling it. */ struct value * -value_at (struct type *type, CORE_ADDR addr, asection *sect) +value_at (struct type *type, CORE_ADDR addr) { struct value *val; @@ -464,7 +461,6 @@ value_at (struct type *type, CORE_ADDR addr, asection *sect) VALUE_LVAL (val) = lval_memory; VALUE_ADDRESS (val) = addr; - VALUE_BFD_SECTION (val) = sect; return val; } @@ -472,7 +468,7 @@ value_at (struct type *type, CORE_ADDR addr, asection *sect) /* Return a lazy value with type TYPE located at ADDR (cf. value_at). */ struct value * -value_at_lazy (struct type *type, CORE_ADDR addr, asection *sect) +value_at_lazy (struct type *type, CORE_ADDR addr) { struct value *val; @@ -484,7 +480,6 @@ value_at_lazy (struct type *type, CORE_ADDR addr, asection *sect) VALUE_LVAL (val) = lval_memory; VALUE_ADDRESS (val) = addr; VALUE_LAZY (val) = 1; - VALUE_BFD_SECTION (val) = sect; return val; } @@ -853,7 +848,6 @@ value_coerce_function (struct value *arg1) retval = value_from_pointer (lookup_pointer_type (VALUE_TYPE (arg1)), (VALUE_ADDRESS (arg1) + VALUE_OFFSET (arg1))); - VALUE_BFD_SECTION (retval) = VALUE_BFD_SECTION (arg1); return retval; } @@ -891,7 +885,6 @@ value_addr (struct value *arg1) arg2 = value_change_enclosing_type (arg2, lookup_pointer_type (VALUE_ENCLOSING_TYPE (arg1))); /* ... and also the relative position of the subobject in the full object */ VALUE_POINTED_TO_OFFSET (arg2) = VALUE_EMBEDDED_OFFSET (arg1); - VALUE_BFD_SECTION (arg2) = VALUE_BFD_SECTION (arg1); return arg2; } @@ -916,8 +909,7 @@ value_ind (struct value *arg1) BUILTIN_TYPE_LONGEST would seem to be a mistake. */ if (TYPE_CODE (base_type) == TYPE_CODE_INT) return value_at_lazy (builtin_type_int, - (CORE_ADDR) value_as_long (arg1), - VALUE_BFD_SECTION (arg1)); + (CORE_ADDR) value_as_long (arg1)); else if (TYPE_CODE (base_type) == TYPE_CODE_PTR) { struct type *enc_type; @@ -926,9 +918,8 @@ value_ind (struct value *arg1) enc_type = check_typedef (VALUE_ENCLOSING_TYPE (arg1)); enc_type = TYPE_TARGET_TYPE (enc_type); /* Retrieve the enclosing object pointed to */ - arg2 = value_at_lazy (enc_type, - value_as_address (arg1) - VALUE_POINTED_TO_OFFSET (arg1), - VALUE_BFD_SECTION (arg1)); + arg2 = value_at_lazy (enc_type, (value_as_address (arg1) + - VALUE_POINTED_TO_OFFSET (arg1))); /* Re-adjust type */ VALUE_TYPE (arg2) = TYPE_TARGET_TYPE (base_type); /* Add embedding info */ @@ -1044,7 +1035,6 @@ value_array (int lowbound, int highbound, struct value **elemvec) VALUE_CONTENTS_ALL (elemvec[idx]), typelength); } - VALUE_BFD_SECTION (val) = VALUE_BFD_SECTION (elemvec[0]); return val; } @@ -1062,7 +1052,7 @@ value_array (int lowbound, int highbound, struct value **elemvec) /* Create the array type and set up an array value to be evaluated lazily. */ - val = value_at_lazy (arraytype, addr, VALUE_BFD_SECTION (elemvec[0])); + val = value_at_lazy (arraytype, addr); return (val); } @@ -1100,7 +1090,7 @@ value_string (char *ptr, int len) addr = allocate_space_in_inferior (len); write_memory (addr, ptr, len); - val = value_at_lazy (stringtype, addr, NULL); + val = value_at_lazy (stringtype, addr); return (val); } @@ -1434,7 +1424,7 @@ find_rt_vbase_offset (struct type *type, struct type *basetype, char *valaddr, & use long type */ /* epstein : FIXME -- added param for overlay section. May not be correct */ - vp = value_at (builtin_type_int, vtbl + 4 * (-skip - index - HP_ACC_VBASE_START), NULL); + vp = value_at (builtin_type_int, vtbl + 4 * (-skip - index - HP_ACC_VBASE_START)); boffset = value_as_long (vp); *skip_p = -1; *boffset_p = boffset; @@ -2641,8 +2631,7 @@ value_full_object (struct value *argp, struct type *rtype, int xfull, int xtop, adjusting for the embedded offset of argp if that's what value_rtti_type used for its computation. */ new_val = value_at_lazy (real_type, VALUE_ADDRESS (argp) - top + - (using_enc ? 0 : VALUE_EMBEDDED_OFFSET (argp)), - VALUE_BFD_SECTION (argp)); + (using_enc ? 0 : VALUE_EMBEDDED_OFFSET (argp))); VALUE_TYPE (new_val) = VALUE_TYPE (argp); VALUE_EMBEDDED_OFFSET (new_val) = using_enc ? top + VALUE_EMBEDDED_OFFSET (argp) : top; return new_val; |