* Makefile.in (VERSION): Bump to 4.5.2.

* Makefile.in (DEMANGLE_OPTS):  Add, default to -Dnounderscore.
	* configure.in:  Simplify ncr3000 gdb_host logic, add gdb_target.
	* dwarfread.c (struct_type):  Apply fix from Peggy Fieland for
	proper handling of bit fields.
	* gdbtypes.h (struct type):  Clarify use of field.bitpos.
	* symtab.h:  Fix couple of misspellings in comments.
	* value.h (struct value):  Clarify use of bitpos.
	* value.h (unpack_field_as_long):  Change prototype, returns
	LONGEST.
	* values.c (unpack_field_as_long):  Change return type to LONGEST,
	sign extend unpacked fields that are signed, other rewriting.
	* config/ncr3000.mt:  New target config file.
This commit is contained in:
Fred Fish
1992-05-03 23:05:07 +00:00
parent d752f749c8
commit 4db8e515c4
6 changed files with 92 additions and 19 deletions

View File

@@ -856,7 +856,27 @@ struct_type (dip, thisdie, enddie, objfile)
list -> field.name = savestring (mbr.at_name, strlen (mbr.at_name));
list -> field.type = decode_die_type (&mbr);
list -> field.bitpos = 8 * locval (mbr.at_location);
list -> field.bitsize = 0;
/* Handle bit fields. */
list -> field.bitsize = mbr.at_bit_size;
#if BITS_BIG_ENDIAN
/* For big endian bits, the at_bit_offset gives the additional
bit offset from the MSB of the containing anonymous object to
the MSB of the field. We don't have to do anything special
since we don't need to know the size of the anonymous object. */
list -> field.bitpos += mbr.at_bit_offset;
#else
/* For little endian bits, we need to have a non-zero at_bit_size,
so that we know we are in fact dealing with a bitfield. Compute
the bit offset to the MSB of the anonymous object, subtract off
the number of bits from the MSB of the field to the MSB of the
object, and then subtract off the number of bits of the field
itself. The result is the bit offset of the LSB of the field. */
if (mbr.at_bit_size > 0)
{
list -> field.bitpos +=
mbr.at_byte_size * 8 - mbr.at_bit_offset - mbr.at_bit_size;
}
#endif
nfields++;
break;
default: