diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 13:25:17 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:07 -0700 |
commit | 317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced (patch) | |
tree | 20bca3a06c842e4eed5101debd1f672539e87714 /gdb/value.h | |
parent | cbe793af8831a7244de326d6b07c60c197f096a2 (diff) | |
download | gdb-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.zip gdb-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.tar.gz gdb-317c3ed9fc9bc5dacd267d131e8c9ca7c1cbdced.tar.bz2 |
Turn allocate_value into a static "constructor"
This changes allocate_value to be a static "constructor" of value.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/value.h b/gdb/value.h index 29ed2a8..c1c9199 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -166,6 +166,9 @@ public: NULL; it will be allocated when it is fetched from the target. */ static struct value *allocate_lazy (struct type *type); + /* Allocate a value and its contents for type TYPE. */ + static struct value *allocate (struct type *type); + ~value (); DISABLE_COPY_AND_ASSIGN (value); @@ -531,6 +534,12 @@ public: limited_length will be set to indicate the length in octets that were loaded from the inferior. */ ULONGEST m_limited_length = 0; + +private: + + /* Allocate a value and its contents for type TYPE. If CHECK_SIZE + is true, then apply the usual max-value-size checks. */ + static struct value *allocate (struct type *type, bool check_size); }; /* Returns value_type or value_enclosing_type depending on @@ -1011,8 +1020,6 @@ extern struct value *read_var_value (struct symbol *var, const struct block *var_block, frame_info_ptr frame); -extern struct value *allocate_value (struct type *type); - extern void value_contents_copy (struct value *dst, LONGEST dst_offset, struct value *src, LONGEST src_offset, LONGEST length); |