aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c10
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);