aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 14:17:50 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:16 -0700
commite989e63761c66d632e1e3b9b40feb12e76cc5dd3 (patch)
tree9eadbd3a0540dc8f0032f4f4e2c8f045eaa6fea2 /gdb/valprint.c
parent02744ba9a2cfb7d1d2b8ebb6e80178a68bf56e06 (diff)
downloadgdb-e989e63761c66d632e1e3b9b40feb12e76cc5dd3.zip
gdb-e989e63761c66d632e1e3b9b40feb12e76cc5dd3.tar.gz
gdb-e989e63761c66d632e1e3b9b40feb12e76cc5dd3.tar.bz2
Turn value_bits_synthetic_pointer into a method
This changes value_bits_synthetic_pointer to be a method of value. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 2fa18b8..08e8826 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -381,8 +381,8 @@ valprint_check_validity (struct ui_file *stream,
return 0;
}
- if (value_bits_synthetic_pointer (val, TARGET_CHAR_BIT * embedded_offset,
- TARGET_CHAR_BIT * type->length ()))
+ if (val->bits_synthetic_pointer (TARGET_CHAR_BIT * embedded_offset,
+ TARGET_CHAR_BIT * type->length ()))
{
const int is_ref = type->code () == TYPE_CODE_REF;
int ref_is_addressable = 0;
@@ -568,9 +568,8 @@ generic_val_print_ref (struct type *type,
struct type *elttype = check_typedef (type->target_type ());
struct value *deref_val = NULL;
const int value_is_synthetic
- = value_bits_synthetic_pointer (original_value,
- TARGET_CHAR_BIT * embedded_offset,
- TARGET_CHAR_BIT * type->length ());
+ = original_value->bits_synthetic_pointer (TARGET_CHAR_BIT * embedded_offset,
+ TARGET_CHAR_BIT * type->length ());
const int must_coerce_ref = ((options->addressprint && value_is_synthetic)
|| options->deref_ref);
const int type_is_defined = elttype->code () != TYPE_CODE_UNDEF;