diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 13:59:56 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:22:12 -0700 |
commit | 82ca8f72011ed3d4661fc05e908cfa8f01c8f6f2 (patch) | |
tree | 2fe3ccb1934b66a200b9aa219a33bf3c8cdaf436 /gdb/value.h | |
parent | 78259c365fb3c8e4fba9c19020fb8bdd8546c9f9 (diff) | |
download | fsf-binutils-gdb-82ca8f72011ed3d4661fc05e908cfa8f01c8f6f2.zip fsf-binutils-gdb-82ca8f72011ed3d4661fc05e908cfa8f01c8f6f2.tar.gz fsf-binutils-gdb-82ca8f72011ed3d4661fc05e908cfa8f01c8f6f2.tar.bz2 |
Turn allocate_value_contents into a method
This turns the static function allocate_value_contents into a method
on value. It is temporarily public, until some users are converted.
set_limited_array_length is converted as well.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h index a7eed48..0b49dea 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -586,6 +586,19 @@ private: /* Helper for fetch_lazy when the value is in a register. */ void fetch_lazy_register (); + + /* Try to limit ourselves to only fetching the limited number of + elements. However, if this limited number of elements still + puts us over max_value_size, then we still refuse it and + return failure here, which will ultimately throw an error. */ + bool set_limited_array_length (); + +public: /* Temporary */ + + /* Allocate the contents of this value if it has not been allocated + yet. If CHECK_SIZE is true, then apply the usual max-value-size + checks. */ + void allocate_contents (bool check_size); }; /* Returns value_type or value_enclosing_type depending on |