- *result = val;
- return 1;
-}
-
-/* Unpack a bitfield of the specified FIELD_TYPE, from the object at
- VALADDR + EMBEDDED_OFFSET, and store the result in *RESULT.
- VALADDR points to the contents of ORIGINAL_VALUE, which must not be
- NULL. The bitfield starts at BITPOS bits and contains BITSIZE
- bits.
-
- Returns false if the value contents are unavailable, otherwise
- returns true, indicating a valid value has been stored in *RESULT.
-
- Extracting bits depends on endianness of the machine. Compute the
- number of least significant bits to discard. For big endian machines,
- we compute the total number of bits in the anonymous object, subtract
- off the bit count from the MSB of the object to the MSB of the
- bitfield, then the size of the bitfield, which leaves the LSB discard
- count. For little endian machines, the discard count is simply the
- number of bits from the LSB of the anonymous object to the LSB of the
- bitfield.
-
- If the field is signed, we also do sign extension. */
-
-int
-unpack_value_bits_as_long (struct type *field_type, const gdb_byte *valaddr,
- int embedded_offset, int bitpos, int bitsize,
- const struct value *original_value,
- LONGEST *result)
-{
- gdb_assert (original_value != NULL);
-
- return unpack_value_bits_as_long_1 (field_type, valaddr, embedded_offset,
- bitpos, bitsize, original_value, result);
-
-}
-
-/* Unpack a field FIELDNO of the specified TYPE, from the object at
- VALADDR + EMBEDDED_OFFSET. VALADDR points to the contents of
- ORIGINAL_VALUE. See unpack_value_bits_as_long for more
- details. */
-
-static int
-unpack_value_field_as_long_1 (struct type *type, const gdb_byte *valaddr,
- int embedded_offset, int fieldno,
- const struct value *val, LONGEST *result)
-{
- int bitpos = TYPE_FIELD_BITPOS (type, fieldno);
- int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
- struct type *field_type = TYPE_FIELD_TYPE (type, fieldno);
-
- return unpack_value_bits_as_long_1 (field_type, valaddr, embedded_offset,
- bitpos, bitsize, val,
- result);