aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 12:27:30 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:07 -0700
commit9feb2d07debe7d04a33cbd90f895d529b7a04f41 (patch)
treee888b8d28f7cc96be1c72adb5bc593f5297859af /gdb/value.h
parent8e5b19ad992b56cb3817dcbd4c656e2ffc3ee889 (diff)
downloadbinutils-9feb2d07debe7d04a33cbd90f895d529b7a04f41.zip
binutils-9feb2d07debe7d04a33cbd90f895d529b7a04f41.tar.gz
binutils-9feb2d07debe7d04a33cbd90f895d529b7a04f41.tar.bz2
Turn value_address and set_value_address functions into methods
This changes the value_address and set_value_address functions to be methods of value. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/value.h b/gdb/value.h
index e813970..6422cfb 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -325,6 +325,19 @@ struct value
void set_initialized (int value)
{ m_initialized = value; }
+ /* If lval == lval_memory, return the address in the inferior. If
+ lval == lval_register, return the byte offset into the registers
+ structure. Otherwise, return 0. The returned address
+ includes the offset, if any. */
+ CORE_ADDR address () const;
+
+ /* Like address, except the result does not include value's
+ offset. */
+ CORE_ADDR raw_address () const;
+
+ /* Set the address of a value. */
+ void set_address (CORE_ADDR);
+
/* Type of value; either not an lval, or one of the various
different possible kinds of lval. */
@@ -678,19 +691,6 @@ extern void set_value_component_location (struct value *component,
possible kinds of lval. */
#define VALUE_LVAL(val) (*((val)->deprecated_lval_hack ()))
-/* If lval == lval_memory, return the address in the inferior. If
- lval == lval_register, return the byte offset into the registers
- structure. Otherwise, return 0. The returned address
- includes the offset, if any. */
-extern CORE_ADDR value_address (const struct value *);
-
-/* Like value_address, except the result does not include value's
- offset. */
-extern CORE_ADDR value_raw_address (const struct value *);
-
-/* Set the address of a value. */
-extern void set_value_address (struct value *, CORE_ADDR);
-
/* Pointer to internal variable. */
extern struct internalvar **deprecated_value_internalvar_hack (struct value *);
#define VALUE_INTERNALVAR(val) (*deprecated_value_internalvar_hack (val))