diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-08-31 11:46:27 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-08-31 13:16:14 -0400 |
commit | 3757d2d44f63b446469723e0a7a8c0dc2f695a6c (patch) | |
tree | d649580e7a3b2b92ab132bd623443695bcfc0bc0 /gdb/value.c | |
parent | 3be8c91910114853a64ab87fd1efaef220bb0205 (diff) | |
download | gdb-3757d2d44f63b446469723e0a7a8c0dc2f695a6c.zip gdb-3757d2d44f63b446469723e0a7a8c0dc2f695a6c.tar.gz gdb-3757d2d44f63b446469723e0a7a8c0dc2f695a6c.tar.bz2 |
gdb: remove TYPE_FIELD_BITSIZE
Replace with type::field + field::bitsize.
Change-Id: I2a24755a33683e4a2775a6d2a7b7a9ae7362e43a
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/value.c')
-rw-r--r-- | gdb/value.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/value.c b/gdb/value.c index 4226e79..1cc3262 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -2946,7 +2946,7 @@ value::primitive_field (LONGEST offset, int fieldno, struct type *arg_type) description correctly. */ check_typedef (type); - if (TYPE_FIELD_BITSIZE (arg_type, fieldno)) + if (arg_type->field (fieldno).bitsize ()) { /* Handle packed fields. @@ -2961,7 +2961,7 @@ value::primitive_field (LONGEST offset, int fieldno, struct type *arg_type) LONGEST container_bitsize = type->length () * 8; v = value::allocate_lazy (type); - v->set_bitsize (TYPE_FIELD_BITSIZE (arg_type, fieldno)); + v->set_bitsize (arg_type->field (fieldno).bitsize ()); if ((bitpos % container_bitsize) + v->bitsize () <= container_bitsize && type->length () <= (int) sizeof (LONGEST)) v->set_bitpos (bitpos % container_bitsize); @@ -3180,7 +3180,7 @@ unpack_value_field_as_long (struct type *type, const gdb_byte *valaddr, const struct value *val, LONGEST *result) { int bitpos = type->field (fieldno).loc_bitpos (); - int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); + int bitsize = type->field (fieldno).bitsize (); struct type *field_type = type->field (fieldno).type (); int bit_offset; @@ -3203,7 +3203,7 @@ LONGEST unpack_field_as_long (struct type *type, const gdb_byte *valaddr, int fieldno) { int bitpos = type->field (fieldno).loc_bitpos (); - int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); + int bitsize = type->field (fieldno).bitsize (); struct type *field_type = type->field (fieldno).type (); return unpack_bits_as_long (field_type, valaddr, bitpos, bitsize); @@ -3261,7 +3261,7 @@ value_field_bitfield (struct type *type, int fieldno, LONGEST embedded_offset, const struct value *val) { int bitpos = type->field (fieldno).loc_bitpos (); - int bitsize = TYPE_FIELD_BITSIZE (type, fieldno); + int bitsize = type->field (fieldno).bitsize (); struct value *res_val = value::allocate (type->field (fieldno).type ()); val->unpack_bitfield (res_val, bitpos, bitsize, valaddr, embedded_offset); |