From cda0334434412d888443e9a98386255f2e0c2eab Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 14:43:22 -0700 Subject: 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 --- gdb/value.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gdb/value.h') 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); -- cgit v1.1