diff options
-rw-r--r-- | gdb/ChangeLog | 31 | ||||
-rw-r--r-- | gdb/ada-lang.c | 4 | ||||
-rw-r--r-- | gdb/c-valprint.c | 7 | ||||
-rw-r--r-- | gdb/dwarf2loc.c | 2 | ||||
-rw-r--r-- | gdb/eval.c | 3 | ||||
-rw-r--r-- | gdb/expprint.c | 3 | ||||
-rw-r--r-- | gdb/f-valprint.c | 3 | ||||
-rw-r--r-- | gdb/findvar.c | 6 | ||||
-rw-r--r-- | gdb/gnu-v3-abi.c | 11 | ||||
-rw-r--r-- | gdb/hpacc-abi.c | 14 | ||||
-rw-r--r-- | gdb/infcall.c | 2 | ||||
-rw-r--r-- | gdb/jv-lang.c | 4 | ||||
-rw-r--r-- | gdb/jv-valprint.c | 2 | ||||
-rw-r--r-- | gdb/p-valprint.c | 5 | ||||
-rw-r--r-- | gdb/printcmd.c | 21 | ||||
-rw-r--r-- | gdb/valarith.c | 1 | ||||
-rw-r--r-- | gdb/valops.c | 31 | ||||
-rw-r--r-- | gdb/value.h | 13 | ||||
-rw-r--r-- | gdb/values.c | 8 |
19 files changed, 76 insertions, 95 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 409c578..422a90f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,36 @@ 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. + +2004-11-09 Andrew Cagney <cagney@gnu.org> + * i386-linux-tdep.c: Include "dwarf2-frame.h". * Makefile.in: Update all dependencies. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 00e61a4..f3b17bc 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -1810,7 +1810,7 @@ ada_value_primitive_packed_val (struct value *obj, char *valaddr, long offset, else if (VALUE_LAZY (obj)) { v = value_at (type, - VALUE_ADDRESS (obj) + VALUE_OFFSET (obj) + offset, NULL); + VALUE_ADDRESS (obj) + VALUE_OFFSET (obj) + offset); bytes = (unsigned char *) alloca (len); read_memory (VALUE_ADDRESS (v), bytes, len); } @@ -7772,7 +7772,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, struct type *arrType = ada_type_of_array (arg1, 0); if (arrType == NULL) error ("Attempt to dereference null array pointer."); - return value_at_lazy (arrType, 0, NULL); + return value_at_lazy (arrType, 0); } else if (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_CODE (type) == TYPE_CODE_REF diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index fd42ae0..5a25498 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -231,7 +231,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset, { wtype = TYPE_TARGET_TYPE (type); } - vt_val = value_at (wtype, vt_address, NULL); + vt_val = value_at (wtype, vt_address); val_print (VALUE_TYPE (vt_val), VALUE_CONTENTS (vt_val), 0, VALUE_ADDRESS (vt_val), stream, format, deref_ref, recurse + 1, pretty); @@ -281,8 +281,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset, value_at (TYPE_TARGET_TYPE (type), unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr + embedded_offset), - NULL); + valaddr + embedded_offset)); val_print (VALUE_TYPE (deref_val), VALUE_CONTENTS (deref_val), 0, @@ -445,7 +444,7 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset, case TYPE_CODE_METHOD: { - struct value *v = value_at (type, address, NULL); + struct value *v = value_at (type, address); cp_print_class_method (VALUE_CONTENTS (value_addr (v)), lookup_pointer_type (type), stream); break; diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index c281642..6657791 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -247,8 +247,6 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame, CORE_ADDR address = dwarf_expr_fetch (ctx, 0); retval = allocate_value (SYMBOL_TYPE (var)); - VALUE_BFD_SECTION (retval) = SYMBOL_BFD_SECTION (var); - VALUE_LVAL (retval) = lval_memory; VALUE_LAZY (retval) = 1; VALUE_ADDRESS (retval) = address; @@ -1972,8 +1972,7 @@ evaluate_subexp_standard (struct type *expect_type, return value_zero (exp->elts[pc + 1].type, lval_memory); else return value_at_lazy (exp->elts[pc + 1].type, - value_as_address (arg1), - NULL); + value_as_address (arg1)); case UNOP_PREINCREMENT: arg1 = evaluate_subexp (expect_type, exp, pos, noside); diff --git a/gdb/expprint.c b/gdb/expprint.c index 5949475..3131044 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -388,8 +388,7 @@ print_subexp_standard (struct expression *exp, int *pos, its type; print the value in the type of the MEMVAL. */ (*pos) += 4; val = value_at_lazy (exp->elts[pc + 1].type, - (CORE_ADDR) exp->elts[pc + 5].longconst, - NULL); + (CORE_ADDR) exp->elts[pc + 5].longconst); value_print (val, stream, 0, Val_no_prettyprint); } else diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c index 805590f..bffb710 100644 --- a/gdb/f-valprint.c +++ b/gdb/f-valprint.c @@ -442,8 +442,7 @@ f_val_print (struct type *type, char *valaddr, int embedded_offset, value_at (TYPE_TARGET_TYPE (type), unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr + embedded_offset), - NULL); + valaddr + embedded_offset)); val_print (VALUE_TYPE (deref_val), VALUE_CONTENTS (deref_val), 0, diff --git a/gdb/findvar.c b/gdb/findvar.c index 3d5d3f3..0e8da56 100644 --- a/gdb/findvar.c +++ b/gdb/findvar.c @@ -386,7 +386,6 @@ read_var_value (struct symbol *var, struct frame_info *frame) v = allocate_value (type); VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */ - VALUE_BFD_SECTION (v) = SYMBOL_BFD_SECTION (var); len = TYPE_LENGTH (type); @@ -450,7 +449,7 @@ Attempt to access variable defined in different shared object or load module whe addresses have not been bound by the dynamic loader. Try again when executable is running."); locaddr = SYMBOL_VALUE_ADDRESS (var); - loc = value_at (lookup_pointer_type (type), locaddr, NULL); + loc = value_at (lookup_pointer_type (type), locaddr); addr = value_as_address (loc); } @@ -473,7 +472,7 @@ addresses have not been bound by the dynamic loader. Try again when executable i if (!argref) return 0; argref += SYMBOL_VALUE (var); - ref = value_at (lookup_pointer_type (type), argref, NULL); + ref = value_at (lookup_pointer_type (type), argref); addr = value_as_address (ref); break; } @@ -758,7 +757,6 @@ locate_var_value (struct symbol *var, struct frame_info *frame) addr = VALUE_ADDRESS (lazy_value); val = value_from_pointer (lookup_pointer_type (type), addr); - VALUE_BFD_SECTION (val) = VALUE_BFD_SECTION (lazy_value); return val; } diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 195af26..bf5218b 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -226,8 +226,7 @@ gnuv3_rtti_type (struct value *value, vtable_address = value_as_address (value_field (value, TYPE_VPTR_FIELDNO (value_type))); vtable = value_at_lazy (vtable_type, - vtable_address - vtable_address_point_offset (), - VALUE_BFD_SECTION (value)); + vtable_address - vtable_address_point_offset ()); /* Find the linker symbol for this vtable. */ vtable_symbol @@ -330,8 +329,7 @@ gnuv3_virtual_fn_field (struct value **value_p, = value_as_address (value_field (value, TYPE_VPTR_FIELDNO (vfn_base))); vtable = value_at_lazy (vtable_type, - vtable_address - vtable_address_point_offset (), - VALUE_BFD_SECTION (value)); + vtable_address - vtable_address_point_offset ()); /* Fetch the appropriate function pointer from the vtable. */ vfn = value_subscript (value_field (vtable, vtable_field_virtual_functions), @@ -409,10 +407,9 @@ gnuv3_baseclass_offset (struct type *type, int index, char *valaddr, TYPE_NAME (vbasetype) ? TYPE_NAME (vbasetype) : "<unknown>"); vtable_address = value_as_address (value_at_lazy (builtin_type_void_data_ptr, - address, NULL)); + address)); vtable = value_at_lazy (vtable_type, - vtable_address - vtable_address_point_offset (), - NULL); + vtable_address - vtable_address_point_offset ()); offset_val = value_from_longest(builtin_type_int, 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)); diff --git a/gdb/hpacc-abi.c b/gdb/hpacc-abi.c index 0fb3adc..27cc94b 100644 --- a/gdb/hpacc-abi.c +++ b/gdb/hpacc-abi.c @@ -128,7 +128,7 @@ hpacc_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j, * which case the multiplier should be 8 and values should be long */ vp = value_at (builtin_type_int, coreptr + 4 * (TYPE_FN_FIELD_VOFFSET (f, j) + - HP_ACC_VFUNC_START), NULL); + HP_ACC_VFUNC_START)); coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp)); /* coreptr now contains the address of the virtual function */ @@ -147,13 +147,13 @@ hpacc_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j, /* pai: FIXME 32x64 problem here, if words are 8 bytes long * the multiplier below has to be 8 and value should be long. */ vp = value_at (builtin_type_int, - coreptr + 4 * (HP_ACC_VFUNC_START + class_index), NULL); + coreptr + 4 * (HP_ACC_VFUNC_START + class_index)); /* Indirect once more, offset by function index */ /* pai: FIXME 32x64 problem here, again multiplier could be 8 and value long */ coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp) + 4 * TYPE_FN_FIELD_VOFFSET (f, j)); - vp = value_at (builtin_type_int, coreptr, NULL); + vp = value_at (builtin_type_int, coreptr); coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp)); /* coreptr now contains the address of the virtual function */ @@ -229,16 +229,14 @@ hpacc_value_rtti_type (struct value *v, int *full, int *top, int *using_enc) /* Fetch the top offset of the object */ /* FIXME possible 32x64 problem with pointer size & arithmetic */ vp = value_at (builtin_type_int, - coreptr + 4 * HP_ACC_TOP_OFFSET_OFFSET, - VALUE_BFD_SECTION (v)); + coreptr + 4 * HP_ACC_TOP_OFFSET_OFFSET); top_offset = value_as_long (vp); if (top) *top = top_offset; /* Fetch the typeinfo pointer */ /* FIXME possible 32x64 problem with pointer size & arithmetic */ - vp = value_at (builtin_type_int, coreptr + 4 * HP_ACC_TYPEINFO_OFFSET, - VALUE_BFD_SECTION (v)); + vp = value_at (builtin_type_int, coreptr + 4 * HP_ACC_TYPEINFO_OFFSET); /* Indirect through the typeinfo pointer and retrieve the pointer * to the string name */ coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp)); @@ -246,7 +244,7 @@ hpacc_value_rtti_type (struct value *v, int *full, int *top, int *using_enc) error ("Retrieved null typeinfo pointer in trying to determine " "run-time type"); /* 4 -> offset of name field */ - vp = value_at (builtin_type_int, coreptr + 4, VALUE_BFD_SECTION (v)); + vp = value_at (builtin_type_int, coreptr + 4); /* FIXME possible 32x64 problem */ coreptr = *(CORE_ADDR *) (VALUE_CONTENTS (vp)); diff --git a/gdb/infcall.c b/gdb/infcall.c index ec4f11a..ef36935 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -852,7 +852,7 @@ the function call).", name); you're seeing problems with values being returned using the "struct return convention", check that PUSH_DUMMY_CALL isn't playing tricks. */ - retval = value_at (value_type, struct_addr, NULL); + retval = value_at (value_type, struct_addr); else { /* This code only handles "register convention". */ diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index 4b7cf28..3be05d7 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -228,7 +228,7 @@ java_class_from_object (struct value *obj_val) if (TYPE_CODE (VALUE_TYPE (obj_val)) == TYPE_CODE_PTR && TYPE_LENGTH (TYPE_TARGET_TYPE (VALUE_TYPE (obj_val))) == 0) obj_val = value_at (get_java_object_type (), - value_as_address (obj_val), NULL); + value_as_address (obj_val)); vtable_val = value_struct_elt (&obj_val, NULL, "vtable", NULL, "structure"); return value_struct_elt (&vtable_val, NULL, "class", NULL, "structure"); @@ -904,7 +904,7 @@ evaluate_subexp_java (struct type *expect_type, struct expression *exp, error ("array index (%ld) out of bounds (length: %ld)", index, length); address = (address + 4) + index * TYPE_LENGTH (el_type); - return value_at (el_type, address, NULL); + return value_at (el_type, address); } else if (TYPE_CODE (type) == TYPE_CODE_ARRAY) { diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index 8715257..03e5cdd 100644 --- a/gdb/jv-valprint.c +++ b/gdb/jv-valprint.c @@ -68,7 +68,7 @@ java_value_print (struct value *val, struct ui_file *stream, int format, type = type_from_class (java_class_from_object (val)); type = lookup_pointer_type (type); - val = value_at (type, address, NULL); + val = value_at (type, address); } } diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index e24d656..8b0c950 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -237,7 +237,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset, { wtype = TYPE_TARGET_TYPE (type); } - vt_val = value_at (wtype, vt_address, NULL); + vt_val = value_at (wtype, vt_address); val_print (VALUE_TYPE (vt_val), VALUE_CONTENTS (vt_val), 0, VALUE_ADDRESS (vt_val), stream, format, deref_ref, recurse + 1, pretty); @@ -289,8 +289,7 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset, value_at (TYPE_TARGET_TYPE (type), unpack_pointer (lookup_pointer_type (builtin_type_void), - valaddr + embedded_offset), - NULL); + valaddr + embedded_offset)); val_print (VALUE_TYPE (deref_val), VALUE_CONTENTS (deref_val), 0, VALUE_ADDRESS (deref_val), stream, format, diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 8b7d31d..7f683d5 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -70,10 +70,6 @@ static char last_size = 'w'; static CORE_ADDR next_address; -/* Default section to examine next. */ - -static asection *next_section; - /* Last address examined. */ static CORE_ADDR last_examine_address; @@ -170,9 +166,6 @@ static void print_command_1 (char *, int, int); static void validate_format (struct format_data, char *); -static void do_examine (struct format_data, CORE_ADDR addr, - asection * section); - static void print_formatted (struct value *, int, int, struct ui_file *); static struct format_data decode_format (char **, int, int); @@ -288,7 +281,6 @@ print_formatted (struct value *val, int format, int size, if (VALUE_LVAL (val) == lval_memory) { next_address = VALUE_ADDRESS (val) + len; - next_section = VALUE_BFD_SECTION (val); } switch (format) @@ -297,7 +289,6 @@ print_formatted (struct value *val, int format, int size, /* FIXME: Need to handle wchar_t's here... */ next_address = VALUE_ADDRESS (val) + val_print_string (VALUE_ADDRESS (val), -1, 1, stream); - next_section = VALUE_BFD_SECTION (val); break; case 'i': @@ -311,7 +302,6 @@ print_formatted (struct value *val, int format, int size, wrap_here (" "); next_address = VALUE_ADDRESS (val) + gdb_print_insn (VALUE_ADDRESS (val), stream); - next_section = VALUE_BFD_SECTION (val); break; default: @@ -763,7 +753,7 @@ static struct type *examine_g_type; Fetch it from memory and print on gdb_stdout. */ static void -do_examine (struct format_data fmt, CORE_ADDR addr, asection *sect) +do_examine (struct format_data fmt, CORE_ADDR addr) { char format = 0; char size; @@ -776,7 +766,6 @@ do_examine (struct format_data fmt, CORE_ADDR addr, asection *sect) size = fmt.size; count = fmt.count; next_address = addr; - next_section = sect; /* String or instruction format implies fetch single bytes regardless of the specified size. */ @@ -831,7 +820,7 @@ do_examine (struct format_data fmt, CORE_ADDR addr, asection *sect) the disassembler be modified so that LAST_EXAMINE_VALUE is left with the byte sequence from the last complete instruction fetched from memory? */ - last_examine_value = value_at_lazy (val_type, next_address, sect); + last_examine_value = value_at_lazy (val_type, next_address); if (last_examine_value) release_value (last_examine_value); @@ -1304,12 +1293,10 @@ x_command (char *exp, int from_tty) next_address = VALUE_ADDRESS (val); else next_address = value_as_address (val); - if (VALUE_BFD_SECTION (val)) - next_section = VALUE_BFD_SECTION (val); do_cleanups (old_chain); } - do_examine (fmt, next_address, next_section); + do_examine (fmt, next_address); /* If the examine succeeds, we remember its size and format for next time. */ last_size = fmt.size; @@ -1549,7 +1536,7 @@ do_one_display (struct display *d) annotate_display_value (); - do_examine (d->format, addr, VALUE_BFD_SECTION (val)); + do_examine (d->format, addr); } else { diff --git a/gdb/valarith.c b/gdb/valarith.c index 54f332a..cc9a77f 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -122,7 +122,6 @@ value_add (struct value *arg1, struct value *arg2) retval = value_from_pointer (valptrtype, value_as_address (valptr) + (sz * value_as_long (valint))); - VALUE_BFD_SECTION (retval) = VALUE_BFD_SECTION (valptr); return retval; } 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; diff --git a/gdb/value.h b/gdb/value.h index 6a3814c..3a44e68 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -162,9 +162,6 @@ struct value actually exist in the program. */ char optimized_out; - /* The BFD section associated with this value. */ - asection *bfd_section; - /* Actual contents of the value. For use of this value; setting it uses the stuff above. Not valid if lazy is nonzero. Target byte-order. We force it to be aligned properly for any @@ -226,7 +223,6 @@ extern int value_fetch_lazy (struct value *val); #define VALUE_OPTIMIZED_OUT(val) ((val)->optimized_out) #define VALUE_EMBEDDED_OFFSET(val) ((val)->embedded_offset) #define VALUE_POINTED_TO_OFFSET(val) ((val)->pointed_to_offset) -#define VALUE_BFD_SECTION(val) ((val)->bfd_section) /* Convert a REF to the object referenced. */ @@ -236,8 +232,7 @@ extern int value_fetch_lazy (struct value *val); if (TYPE_CODE (value_type_arg_tmp) == TYPE_CODE_REF) \ arg = value_at_lazy (TYPE_TARGET_TYPE (value_type_arg_tmp), \ unpack_pointer (VALUE_TYPE (arg), \ - VALUE_CONTENTS (arg)), \ - VALUE_BFD_SECTION (arg)); \ + VALUE_CONTENTS (arg))); \ } while (0) /* If ARG is an array, convert it to a pointer. @@ -309,10 +304,8 @@ extern struct value *value_from_pointer (struct type *type, CORE_ADDR addr); extern struct value *value_from_double (struct type *type, DOUBLEST num); extern struct value *value_from_string (char *string); -extern struct value *value_at (struct type *type, CORE_ADDR addr, - asection * sect); -extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr, - asection * sect); +extern struct value *value_at (struct type *type, CORE_ADDR addr); +extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr); extern struct value *value_from_register (struct type *type, int regnum, struct frame_info *frame); diff --git a/gdb/values.c b/gdb/values.c index 14c980b..0a82927 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -97,7 +97,6 @@ allocate_value (struct type *type) VALUE_REGNO (val) = -1; VALUE_LAZY (val) = 0; VALUE_OPTIMIZED_OUT (val) = 0; - VALUE_BFD_SECTION (val) = NULL; VALUE_EMBEDDED_OFFSET (val) = 0; VALUE_POINTED_TO_OFFSET (val) = 0; val->modifiable = 1; @@ -228,7 +227,6 @@ value_copy (struct value *arg) VALUE_OPTIMIZED_OUT (val) = VALUE_OPTIMIZED_OUT (arg); VALUE_EMBEDDED_OFFSET (val) = VALUE_EMBEDDED_OFFSET (arg); VALUE_POINTED_TO_OFFSET (val) = VALUE_POINTED_TO_OFFSET (arg); - VALUE_BFD_SECTION (val) = VALUE_BFD_SECTION (arg); val->modifiable = arg->modifiable; if (!VALUE_LAZY (val)) { @@ -795,8 +793,7 @@ value_static_field (struct type *type, int fieldno) if (TYPE_FIELD_STATIC_HAS_ADDR (type, fieldno)) { retval = value_at (TYPE_FIELD_TYPE (type, fieldno), - TYPE_FIELD_STATIC_PHYSADDR (type, fieldno), - NULL); + TYPE_FIELD_STATIC_PHYSADDR (type, fieldno)); } else { @@ -812,8 +809,7 @@ value_static_field (struct type *type, int fieldno) else { retval = value_at (TYPE_FIELD_TYPE (type, fieldno), - SYMBOL_VALUE_ADDRESS (msym), - SYMBOL_BFD_SECTION (msym)); + SYMBOL_VALUE_ADDRESS (msym)); } } else |