aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 14:43:22 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:16 -0700
commitcda0334434412d888443e9a98386255f2e0c2eab (patch)
treef8c03f634efa3dab4e58cb8888f47c073ea21ebe /gdb/value.h
parente18312bb596fcc9b4df1d018038690df28a68b46 (diff)
downloadbinutils-cda0334434412d888443e9a98386255f2e0c2eab.zip
binutils-cda0334434412d888443e9a98386255f2e0c2eab.tar.gz
binutils-cda0334434412d888443e9a98386255f2e0c2eab.tar.bz2
Turn value_copy into a method
This turns value_copy into a method of value. Much of this was written by script. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/value.h b/gdb/value.h
index f38241f..6b0250c 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -165,6 +165,11 @@ public:
/* Create a value of type TYPE that is zero, and return it. */
static struct value *zero (struct type *type, enum lval_type lv);
+ /* Return a copy of the value. It contains the same contents, for
+ the same memory address, but it's a different block of
+ storage. */
+ struct value *copy () const;
+
~value ();
DISABLE_COPY_AND_ASSIGN (value);
@@ -1447,8 +1452,6 @@ extern void preserve_values (struct objfile *);
/* From values.c */
-extern struct value *value_copy (const value *);
-
extern struct value *value_non_lval (struct value *);
extern void value_force_lval (struct value *, CORE_ADDR);