X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fvalue.c;h=781808016cde43778c4446b1ae4f0ff02f17b20d;hb=8aaaf7577f070c91086533d959ac36a15d1d604f;hp=2e2117bf31c37509c69ec562947520bd40ce7378;hpb=53a008a61e22c8d385eb57fb5f786eb0c47ba355;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/value.c b/gdb/value.c index 2e2117bf31..781808016c 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -273,8 +273,8 @@ struct value LONGEST bitsize = 0; /* Only used for bitfields; position of start of field. For - gdbarch_bits_big_endian=0 targets, it is the position of the LSB. For - gdbarch_bits_big_endian=1 targets, it is the position of the MSB. */ + little-endian targets, it is the position of the LSB. For + big-endian targets, it is the position of the MSB. */ LONGEST bitpos = 0; /* The number of references to this value. When a value is created, @@ -3135,7 +3135,7 @@ unpack_bits_as_long (struct type *field_type, const gdb_byte *valaddr, /* Extract bits. See comment above. */ - if (gdbarch_bits_big_endian (get_type_arch (field_type))) + if (byte_order == BFD_ENDIAN_BIG) lsbcount = (bytes_read * 8 - bitpos % 8 - bitsize); else lsbcount = (bitpos % 8); @@ -3311,7 +3311,7 @@ modify_field (struct type *type, gdb_byte *addr, oword = extract_unsigned_integer (addr, bytesize, byte_order); /* Shifting for bit field depends on endianness of the target machine. */ - if (gdbarch_bits_big_endian (get_type_arch (type))) + if (byte_order == BFD_ENDIAN_BIG) bitpos = bytesize * 8 - bitpos - bitsize; oword &= ~(mask << bitpos);