mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
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:
20
gdb/value.h
20
gdb/value.h
@ -198,6 +198,17 @@ struct value
|
||||
void set_parent (struct value *parent)
|
||||
{ m_parent = value_ref_ptr::new_reference (parent); }
|
||||
|
||||
/* Describes offset of a value within lval of a structure in bytes.
|
||||
If lval == lval_memory, this is an offset to the address. If
|
||||
lval == lval_register, this is a further offset from
|
||||
location.address within the registers structure. Note also the
|
||||
member embedded_offset below. */
|
||||
LONGEST offset () const
|
||||
{ return m_offset; }
|
||||
|
||||
void set_offset (LONGEST offset)
|
||||
{ m_offset = offset; }
|
||||
|
||||
|
||||
/* Type of value; either not an lval, or one of the various
|
||||
different possible kinds of lval. */
|
||||
@ -376,15 +387,6 @@ struct value
|
||||
ULONGEST m_limited_length = 0;
|
||||
};
|
||||
|
||||
/* Describes offset of a value within lval of a structure in bytes.
|
||||
If lval == lval_memory, this is an offset to the address. If lval
|
||||
== lval_register, this is a further offset from location.address
|
||||
within the registers structure. Note also the member
|
||||
embedded_offset below. */
|
||||
|
||||
extern LONGEST value_offset (const struct value *);
|
||||
extern void set_value_offset (struct value *, LONGEST offset);
|
||||
|
||||
/* The comment from "struct value" reads: ``Is it modifiable? Only
|
||||
relevant if lval != not_lval.''. Shouldn't the value instead be
|
||||
not_lval and be done with it? */
|
||||
|
Reference in New Issue
Block a user