From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 4EA913858C2F; Mon, 13 Feb 2023 22:28:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EA913858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676327305; bh=W33LEydaeXqY2xZkGnTEWlA2xOVqHpU0Y8qXSmnt5sM=; h=From:To:Subject:Date:From; b=rtcn1UCKkbcKNOf9GF6rXL/bumc908GVczImxk6JW8b2eLRdL8uw0wVVP8lm4syCa pj30Dqgcjum5yD4ISLV2hF7+j/byx65/1DUbD1G3NxQBftxlRqeRd484pxRm8no7dE 6oLPRaDX11HQcTNZBygHVPGbAHy5PGi+KO9v6J1M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Turn some value offset functions into method X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 463b870d01ae26aa3366e99fb86416b1c67f8061 X-Git-Newrev: 391f86284f6fff1011ace7136f4bd2bb438de3c6 Message-Id: <20230213222825.4EA913858C2F@sourceware.org> Date: Mon, 13 Feb 2023 22:28:25 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D391f86284f6f= ff1011ace7136f4bd2bb438de3c6 commit 391f86284f6fff1011ace7136f4bd2bb438de3c6 Author: Tom Tromey Date: Tue Jan 31 10:40:38 2023 -0700 Turn some value offset functions into method =20 This changes various offset-related functions to be methods of value. Much of this patch was written by script. =20 Approved-By: Simon Marchi Diff: --- gdb/ada-valprint.c | 4 ++-- gdb/cp-abi.h | 2 +- gdb/cp-valprint.c | 6 +++--- gdb/d-valprint.c | 2 +- gdb/dwarf2/expr.c | 2 +- gdb/eval.c | 2 +- gdb/gdbtypes.c | 2 +- gdb/gnu-v3-abi.c | 20 +++++++++--------- gdb/go-valprint.c | 2 +- gdb/mi/mi-cmd-stack.c | 2 +- gdb/valops.c | 40 +++++++++++++++++------------------ gdb/value.c | 58 +++++++++++++++--------------------------------= ---- gdb/value.h | 18 +++++++++++----- 13 files changed, 72 insertions(+), 88 deletions(-) diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 761d3150937..c1004b5f33c 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -199,8 +199,8 @@ val_print_packed_array_elements (struct type *type, con= st gdb_byte *valaddr, if (check_typedef (v0->type ())->length () !=3D check_typedef (v1->type ())->length ()) break; - if (!value_contents_eq (v0, value_embedded_offset (v0), - v1, value_embedded_offset (v1), + if (!value_contents_eq (v0, v0->embedded_offset (), + v1, v1->embedded_offset (), check_typedef (v0->type ())->length ())) break; } diff --git a/gdb/cp-abi.h b/gdb/cp-abi.h index f7c903eca2d..aade336c3cd 100644 --- a/gdb/cp-abi.h +++ b/gdb/cp-abi.h @@ -124,7 +124,7 @@ extern struct value *value_virtual_fn_field (struct val= ue **valuep, of the complete object to the start of the embedded subobject VALUE represents. In other words, the enclosing object starts at VALUE_ADDR (VALUE) + VALUE->offset () + - value_embedded_offset (VALUE) + *TOP + VALUE->embedded_offset () + *TOP - If *USING_ENC is non-zero, then *TOP is the offset from the address of the complete object to the enclosing object stored in VALUE. In other words, the enclosing object starts at diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 476ec9c1b1e..634f5a94cee 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -282,7 +282,7 @@ cp_print_value_fields (struct value *val, struct ui_fil= e *stream, opts->deref_ref =3D false; =20 v =3D value_field_bitfield (type, i, valaddr, - value_embedded_offset (val), val); + val->embedded_offset (), val); =20 common_val_print (v, stream, recurse + 1, opts, current_language); @@ -321,7 +321,7 @@ cp_print_value_fields (struct value *val, struct ui_fil= e *stream, { CORE_ADDR addr; =20 - i_offset +=3D value_embedded_offset (val); + i_offset +=3D val->embedded_offset (); addr =3D extract_typed_address (valaddr + i_offset, i_type); print_function_pointer_address (opts, type->arch (), @@ -432,7 +432,7 @@ cp_print_value (struct value *val, struct ui_file *stre= am, try { boffset =3D baseclass_offset (type, i, valaddr, - value_embedded_offset (val), + val->embedded_offset (), address, val); } catch (const gdb_exception_error &ex) diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c index 6c7748efa4c..bebe02c967c 100644 --- a/gdb/d-valprint.c +++ b/gdb/d-valprint.c @@ -81,7 +81,7 @@ d_value_print_inner (struct value *val, struct ui_file *s= tream, int recurse, switch (type->code ()) { case TYPE_CODE_STRUCT: - ret =3D dynamic_array_type (type, value_embedded_offset (val), + ret =3D dynamic_array_type (type, val->embedded_offset (), value_address (val), stream, recurse, val, options); if (ret =3D=3D 0) diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index ccce09350d2..0274372a0c4 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -576,7 +576,7 @@ coerce_pieced_ref (const value *value) { struct type *type =3D check_typedef (value->type ()); =20 - if (value_bits_synthetic_pointer (value, value_embedded_offset (value), + if (value_bits_synthetic_pointer (value, value->embedded_offset (), TARGET_CHAR_BIT * type->length ())) { const piece_closure *closure diff --git a/gdb/eval.c b/gdb/eval.c index 6fa359966ec..87147593ed9 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -965,7 +965,7 @@ structop_base_operation::evaluate_funcall ``this'' changes. */ vals[0] =3D value_from_longest (lookup_pointer_type (temp->type ()), value_address (temp) - + value_embedded_offset (temp)); + + temp->embedded_offset ()); } =20 /* Take out `this' if needed. */ diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index b14f051c013..75a567dd3f6 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -4008,7 +4008,7 @@ is_unique_ancestor (struct type *base, struct value *= val) =20 return is_unique_ancestor_worker (base, val->type (), &offset, value_contents_for_printing (val).data (), - value_embedded_offset (val), + val->embedded_offset (), value_address (val), val) =3D=3D 1; } =20 diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 782f5765d6f..36d54b9312b 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -326,7 +326,7 @@ gnuv3_rtti_type (struct value *value, /* Find the linker symbol for this vtable. */ vtable_symbol =3D lookup_minimal_symbol_by_pc (value_address (vtable) - + value_embedded_offset (vtable)).minsym; + + vtable->embedded_offset ()).minsym; if (! vtable_symbol) return NULL; =20 @@ -371,7 +371,7 @@ gnuv3_rtti_type (struct value *value, =3D value_as_long (value_field (vtable, vtable_field_offset_to_top)); =20 if (full_p) - *full_p =3D (- offset_to_top =3D=3D value_embedded_offset (value) + *full_p =3D (- offset_to_top =3D=3D value->embedded_offset () && (value->enclosing_type ()->length () >=3D run_time_type->length ())); if (top_p) @@ -804,7 +804,7 @@ hash_value_and_voffset (const void *p) { const struct value_and_voffset *o =3D (const struct value_and_voffset *)= p; =20 - return value_address (o->value) + value_embedded_offset (o->value); + return value_address (o->value) + o->value->embedded_offset (); } =20 /* Equality function for value_and_voffset. */ @@ -815,8 +815,8 @@ eq_value_and_voffset (const void *a, const void *b) const struct value_and_voffset *ova =3D (const struct value_and_voffset = *) a; const struct value_and_voffset *ovb =3D (const struct value_and_voffset = *) b; =20 - return (value_address (ova->value) + value_embedded_offset (ova->value) - =3D=3D value_address (ovb->value) + value_embedded_offset (ovb->value)); + return (value_address (ova->value) + ova->value->embedded_offset () + =3D=3D value_address (ovb->value) + ovb->value->embedded_offset ()); } =20 /* Comparison function for value_and_voffset. */ @@ -826,9 +826,9 @@ compare_value_and_voffset (const struct value_and_voffs= et *va, const struct value_and_voffset *vb) { CORE_ADDR addra =3D (value_address (va->value) - + value_embedded_offset (va->value)); + + va->value->embedded_offset ()); CORE_ADDR addrb =3D (value_address (vb->value) - + value_embedded_offset (vb->value)); + + vb->value->embedded_offset ()); =20 return addra < addrb; } @@ -908,7 +908,7 @@ print_one_vtable (struct gdbarch *gdbarch, struct value= *value, =20 vtable =3D gnuv3_get_vtable (gdbarch, type, value_address (value) - + value_embedded_offset (value)); + + value->embedded_offset ()); vt_addr =3D value_address (value_field (vtable, vtable_field_virtual_functions)); =20 @@ -916,7 +916,7 @@ print_one_vtable (struct gdbarch *gdbarch, struct value= *value, TYPE_SAFE_NAME (type), paddress (gdbarch, vt_addr), paddress (gdbarch, (value_address (value) - + value_embedded_offset (value)))); + + value->embedded_offset ()))); =20 for (i =3D 0; i <=3D max_voffset; ++i) { @@ -1138,7 +1138,7 @@ gnuv3_get_typeid (struct value *value) && gnuv3_dynamic_class (type)) { struct value *vtable, *typeinfo_value; - CORE_ADDR address =3D value_address (value) + value_embedded_offset = (value); + CORE_ADDR address =3D value_address (value) + value->embedded_offset= (); =20 vtable =3D gnuv3_get_vtable (gdbarch, type, address); if (vtable =3D=3D NULL) diff --git a/gdb/go-valprint.c b/gdb/go-valprint.c index 4d3185ed7d2..dce7bd684b4 100644 --- a/gdb/go-valprint.c +++ b/gdb/go-valprint.c @@ -104,7 +104,7 @@ go_language::value_print_inner (struct value *val, stru= ct ui_file *stream, case GO_TYPE_STRING: if (! options->raw) { - print_go_string (type, value_embedded_offset (val), + print_go_string (type, val->embedded_offset (), value_address (val), stream, recurse, val, options); return; diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 0ac4d6a63cc..abe0d34f042 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -507,7 +507,7 @@ list_arg_or_local (const struct frame_arg *arg, enum wh= at_to_list what, to its representation. */ || (val_print_scalar_type_p (arg->val->type ()) && !value_bytes_available (arg->val, - value_embedded_offset (arg->val), + arg->val->embedded_offset (), arg->val->type ()->length ())))) return; =20 diff --git a/gdb/valops.c b/gdb/valops.c index 9870e0da337..079b64dbbe6 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -275,9 +275,9 @@ value_cast_structs (struct type *type, struct value *v2) if (v) { /* Downcasting is possible (t1 is superclass of v2). */ - CORE_ADDR addr2 =3D value_address (v2) + value_embedded_offset (v2); + CORE_ADDR addr2 =3D value_address (v2) + v2->embedded_offset (); =20 - addr2 -=3D value_address (v) + value_embedded_offset (v); + addr2 -=3D value_address (v) + v->embedded_offset (); return value_at (type, addr2); } } @@ -328,7 +328,7 @@ value_cast_pointers (struct type *type, struct value *a= rg2, arg2 =3D value_copy (arg2); arg2->deprecated_set_type (type); arg2->set_enclosing_type (type); - set_value_pointed_to_offset (arg2, 0); /* pai: chk_val */ + arg2->set_pointed_to_offset (0); /* pai: chk_val */ return arg2; } =20 @@ -650,7 +650,7 @@ value_cast (struct type *type, struct value *arg2) arg2 =3D value_copy (arg2); arg2->deprecated_set_type (to_type); arg2->set_enclosing_type (to_type); - set_value_pointed_to_offset (arg2, 0); /* pai: chk_val */ + arg2->set_pointed_to_offset (0); /* pai: chk_val */ return arg2; } else if (VALUE_LVAL (arg2) =3D=3D lval_memory) @@ -884,7 +884,7 @@ value_dynamic_cast (struct type *type, struct value *ar= g) else if (using_enc) addr +=3D top; else - addr +=3D top + value_embedded_offset (arg); + addr +=3D top + arg->embedded_offset (); =20 /* dynamic_cast means to return a pointer to the most-derived object. */ @@ -903,7 +903,7 @@ value_dynamic_cast (struct type *type, struct value *ar= g) result =3D NULL; if (dynamic_cast_check_1 (resolved_type->target_type (), value_contents_for_printing (tem).data (), - value_embedded_offset (tem), + tem->embedded_offset (), value_address (tem), tem, rtti_type, addr, arg_type, @@ -919,7 +919,7 @@ value_dynamic_cast (struct type *type, struct value *ar= g) if (is_public_ancestor (arg_type, rtti_type) && dynamic_cast_check_2 (resolved_type->target_type (), value_contents_for_printing (tem).data (), - value_embedded_offset (tem), + tem->embedded_offset (), value_address (tem), tem, rtti_type, &result) =3D=3D 1) return value_cast (type, @@ -1353,7 +1353,7 @@ value_assign (struct value *toval, struct value *from= val) if (type->code () =3D=3D TYPE_CODE_PTR) { val->set_enclosing_type (fromval->enclosing_type ()); - set_value_pointed_to_offset (val, value_pointed_to_offset (fromval)); + val->set_pointed_to_offset (fromval->pointed_to_offset ()); } =20 return val; @@ -1556,7 +1556,7 @@ value_addr (struct value *arg1) =20 if (TYPE_IS_REFERENCE (type)) { - if (value_bits_synthetic_pointer (arg1, value_embedded_offset (arg1), + if (value_bits_synthetic_pointer (arg1, arg1->embedded_offset (), TARGET_CHAR_BIT * type->length ())) arg1 =3D coerce_ref (arg1); else @@ -1592,14 +1592,14 @@ value_addr (struct value *arg1) /* Get target memory address. */ arg2 =3D value_from_pointer (lookup_pointer_type (arg1->type ()), (value_address (arg1) - + value_embedded_offset (arg1))); + + arg1->embedded_offset ())); =20 /* This may be a pointer to a base subobject; so remember the full derived object's type ... */ arg2->set_enclosing_type (lookup_pointer_type (arg1->enclosing_type ())); /* ... and also the relative position of the subobject in the full object. */ - set_value_pointed_to_offset (arg2, value_embedded_offset (arg1)); + arg2->set_pointed_to_offset (arg1->embedded_offset ()); return arg2; } =20 @@ -1671,7 +1671,7 @@ value_ind (struct value *arg1) { /* Retrieve the enclosing object pointed to. */ base_addr =3D (value_as_address (arg1) - - value_pointed_to_offset (arg1)); + - arg1->pointed_to_offset ()); } arg2 =3D value_at_lazy (enc_type, base_addr); enc_type =3D arg2->type (); @@ -2076,7 +2076,7 @@ struct_field_searcher::search (struct value *arg1, LO= NGEST offset, int found_baseclass =3D (m_looking_for_baseclass && TYPE_BASECLASS_NAME (type, i) !=3D NULL && (strcmp_iw (m_name, basetype->name ()) =3D=3D 0)); - LONGEST boffset =3D value_embedded_offset (arg1) + offset; + LONGEST boffset =3D arg1->embedded_offset () + offset; =20 if (BASETYPE_VIA_VIRTUAL (type, i)) { @@ -2084,7 +2084,7 @@ struct_field_searcher::search (struct value *arg1, LO= NGEST offset, =20 boffset =3D baseclass_offset (type, i, value_contents_for_printing (arg1).data (), - value_embedded_offset (arg1) + offset, + arg1->embedded_offset () + offset, value_address (arg1), arg1); =20 @@ -2092,7 +2092,7 @@ struct_field_searcher::search (struct value *arg1, LO= NGEST offset, by the user program. Make sure that it still points to a valid memory location. */ =20 - boffset +=3D value_embedded_offset (arg1) + offset; + boffset +=3D arg1->embedded_offset () + offset; if (boffset < 0 || boffset >=3D arg1->enclosing_type ()->length ()) { @@ -2109,7 +2109,7 @@ struct_field_searcher::search (struct value *arg1, LO= NGEST offset, { v2 =3D value_copy (arg1); v2->deprecated_set_type (basetype); - set_value_embedded_offset (v2, boffset); + v2->set_embedded_offset (boffset); } =20 if (found_baseclass) @@ -3978,11 +3978,11 @@ value_full_object (struct value *argp, object, adjusting for the embedded offset of argp if that's what value_rtti_type used for its computation. */ new_val =3D value_at_lazy (real_type, value_address (argp) - top + - (using_enc ? 0 : value_embedded_offset (argp))); + (using_enc ? 0 : argp->embedded_offset ())); new_val->deprecated_set_type (argp->type ()); - set_value_embedded_offset (new_val, (using_enc - ? top + value_embedded_offset (argp) - : top)); + new_val->set_embedded_offset ((using_enc + ? top + argp->embedded_offset () + : top)); return new_val; } =20 diff --git a/gdb/value.c b/gdb/value.c index efa780a897a..c56e0404471 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1406,30 +1406,6 @@ value_bits_synthetic_pointer (const struct value *va= lue, length); } =20 -LONGEST -value_embedded_offset (const struct value *value) -{ - return value->m_embedded_offset; -} - -void -set_value_embedded_offset (struct value *value, LONGEST val) -{ - value->m_embedded_offset =3D val; -} - -LONGEST -value_pointed_to_offset (const struct value *value) -{ - return value->m_pointed_to_offset; -} - -void -set_value_pointed_to_offset (struct value *value, LONGEST val) -{ - value->m_pointed_to_offset =3D val; -} - const struct lval_funcs * value_computed_funcs (const struct value *v) { @@ -1619,7 +1595,7 @@ value_copy (const value *arg) val->m_bitpos =3D arg->m_bitpos; val->m_bitsize =3D arg->m_bitsize; val->m_lazy =3D arg->m_lazy; - val->m_embedded_offset =3D value_embedded_offset (arg); + val->m_embedded_offset =3D arg->embedded_offset (); val->m_pointed_to_offset =3D arg->m_pointed_to_offset; val->m_modifiable =3D arg->m_modifiable; val->m_stack =3D arg->m_stack; @@ -1691,8 +1667,8 @@ value_non_lval (struct value *arg) =20 copy (value_contents_all (arg), value_contents_all_raw (val)); val->m_type =3D arg->m_type; - set_value_embedded_offset (val, value_embedded_offset (arg)); - set_value_pointed_to_offset (val, value_pointed_to_offset (arg)); + val->set_embedded_offset (arg->embedded_offset ()); + val->set_pointed_to_offset (arg->pointed_to_offset ()); return val; } return arg; @@ -3023,7 +2999,7 @@ value_primitive_field (struct value *arg1, LONGEST of= fset, v->m_bitpos =3D bitpos % container_bitsize; else v->m_bitpos =3D bitpos % 8; - v->m_offset =3D (value_embedded_offset (arg1) + v->m_offset =3D (arg1->embedded_offset () + offset + (bitpos - v->m_bitpos) / 8); v->set_parent (arg1); @@ -3047,7 +3023,7 @@ value_primitive_field (struct value *arg1, LONGEST of= fset, if (BASETYPE_VIA_VIRTUAL (arg_type, fieldno)) boffset =3D baseclass_offset (arg_type, fieldno, value_contents (arg1).data (), - value_embedded_offset (arg1), + arg1->embedded_offset (), value_address (arg1), arg1); else @@ -3063,7 +3039,7 @@ value_primitive_field (struct value *arg1, LONGEST of= fset, } v->m_type =3D type; v->m_offset =3D arg1->offset (); - v->m_embedded_offset =3D offset + value_embedded_offset (arg1) + bof= fset; + v->m_embedded_offset =3D offset + arg1->embedded_offset () + boffset; } else if (NULL !=3D TYPE_DATA_LOCATION (type)) { @@ -3091,12 +3067,12 @@ value_primitive_field (struct value *arg1, LONGEST = offset, else { v =3D allocate_value (type); - value_contents_copy_raw (v, value_embedded_offset (v), - arg1, value_embedded_offset (arg1) + offset, + value_contents_copy_raw (v, v->embedded_offset (), + arg1, arg1->embedded_offset () + offset, type_length_units (type)); } v->m_offset =3D (arg1->offset () + offset - + value_embedded_offset (arg1)); + + arg1->embedded_offset ()); } set_value_component_location (v, arg1); return v; @@ -3693,11 +3669,11 @@ value_from_component (struct value *whole, struct t= ype *type, LONGEST offset) else { v =3D allocate_value (type); - value_contents_copy (v, value_embedded_offset (v), - whole, value_embedded_offset (whole) + offset, + value_contents_copy (v, v->embedded_offset (), + whole, whole->embedded_offset () + offset, type_length_units (type)); } - v->m_offset =3D whole->offset () + offset + value_embedded_offset (whole= ); + v->m_offset =3D whole->offset () + offset + whole->embedded_offset (); set_value_component_location (v, whole); =20 return v; @@ -3721,14 +3697,14 @@ value_from_component_bitsize (struct value *whole, = struct type *type, =20 struct value *v =3D allocate_value (type); =20 - LONGEST dst_offset =3D TARGET_CHAR_BIT * value_embedded_offset (v); + LONGEST dst_offset =3D TARGET_CHAR_BIT * v->embedded_offset (); if (is_scalar_type (type) && type_byte_order (type) =3D=3D BFD_ENDIAN_BI= G) dst_offset +=3D TARGET_CHAR_BIT * type->length () - bit_length; =20 value_contents_copy_raw_bitwise (v, dst_offset, whole, TARGET_CHAR_BIT - * value_embedded_offset (whole) + * whole->embedded_offset () + bit_offset, bit_length); return v; @@ -3773,7 +3749,7 @@ readjust_indirect_value_type (struct value *value, st= ruct type *enc_type, =20 /* Add embedding info. */ value->set_enclosing_type (enc_type); - set_value_embedded_offset (value, value_pointed_to_offset (original_valu= e)); + value->set_embedded_offset (original_value->pointed_to_offset ()); =20 /* We may be pointing to an object of some derived type. */ return value_full_object (value, NULL, 0, 0, 0); @@ -3989,8 +3965,8 @@ value_fetch_lazy_register (struct value *val) /* Copy the contents and the unavailability/optimized-out meta-data from NEW_VAL to VAL. */ set_value_lazy (val, 0); - value_contents_copy (val, value_embedded_offset (val), - new_val, value_embedded_offset (new_val), + value_contents_copy (val, val->embedded_offset (), + new_val, new_val->embedded_offset (), type_length_units (type)); =20 if (frame_debug) diff --git a/gdb/value.h b/gdb/value.h index a3d07c0b5fd..d27ac7c5cf8 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -215,6 +215,19 @@ struct value int deprecated_modifiable () const { return m_modifiable; } =20 + LONGEST pointed_to_offset () const + { return m_pointed_to_offset; } + + void set_pointed_to_offset (LONGEST val) + { m_pointed_to_offset =3D val; } + + LONGEST embedded_offset () const + { return m_embedded_offset; } + + void set_embedded_offset (LONGEST val) + { m_embedded_offset =3D val; } + + /* If a value represents a C++ object, then the `type' field gives the object's compile-time type. If the object actually belongs to some class derived from `type', perhaps with other base classes and @@ -455,11 +468,6 @@ extern struct type *value_actual_type (struct value *v= alue, int resolve_simple_types, int *real_type_found); =20 -extern LONGEST value_pointed_to_offset (const struct value *value); -extern void set_value_pointed_to_offset (struct value *value, LONGEST val); -extern LONGEST value_embedded_offset (const struct value *value); -extern void set_value_embedded_offset (struct value *value, LONGEST val); - /* For lval_computed values, this structure holds functions used to retrieve and set the value (or portions of the value).