aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-02-01 07:27:50 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:17 -0700
commit6c49729e593cd1577080b082be81fe113f8d7943 (patch)
tree689669836ab3ee33e0aa5d479de325d1a954d4d3 /gdb/valprint.c
parente3fb3c4772d81a7deb26a3c1af253e9f01b07716 (diff)
downloadgdb-6c49729e593cd1577080b082be81fe113f8d7943.zip
gdb-6c49729e593cd1577080b082be81fe113f8d7943.tar.gz
gdb-6c49729e593cd1577080b082be81fe113f8d7943.tar.bz2
Turn various value copying-related functions into methods
This patch turns a grab bag of value functions to methods of value. These are done together because their implementations are interrelated. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 46d0aee..8c06769 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -2007,9 +2007,9 @@ value_print_array_elements (struct value *val, struct ui_file *stream,
maybe_print_array_index (index_type, i + low_bound,
stream, options);
- struct value *element = value_from_component_bitsize (val, elttype,
- bit_stride * i,
- bit_stride);
+ struct value *element = val->from_component_bitsize (elttype,
+ bit_stride * i,
+ bit_stride);
rep1 = i + 1;
reps = 1;
/* Only check for reps if repeat_count_threshold is not set to
@@ -2022,9 +2022,9 @@ value_print_array_elements (struct value *val, struct ui_file *stream,
while (rep1 < len)
{
struct value *rep_elt
- = value_from_component_bitsize (val, elttype,
- rep1 * bit_stride,
- bit_stride);
+ = val->from_component_bitsize (elttype,
+ rep1 * bit_stride,
+ bit_stride);
bool repeated = ((available
&& rep_elt->entirely_available ()
&& element->contents_eq (rep_elt))