Turn value_offset into method

This changes value_offset to be a method of value.  Much of this patch
was written by script.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 10:05:01 -07:00
parent fac7bdaaab
commit 76675c4d0b
12 changed files with 44 additions and 53 deletions

View File

@ -122,7 +122,7 @@ lval_func_read (struct value *v)
struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
struct type *type = check_typedef (v->type ());
struct type *eltype = check_typedef (c->val->type ())->target_type ();
LONGEST offset = value_offset (v);
LONGEST offset = v->offset ();
LONGEST elsize = eltype->length ();
int n, i, j = 0;
LONGEST lowb = 0;
@ -152,7 +152,7 @@ lval_func_write (struct value *v, struct value *fromval)
struct lval_closure *c = (struct lval_closure *) value_computed_closure (v);
struct type *type = check_typedef (v->type ());
struct type *eltype = check_typedef (c->val->type ())->target_type ();
LONGEST offset = value_offset (v);
LONGEST offset = v->offset ();
LONGEST elsize = eltype->length ();
int n, i, j = 0;
LONGEST lowb = 0;